Move the code for initializing the global base reg out of
X86ISelDAGToDAG.cpp and into X86InstrInfo.cpp. This will allow
it to be reused by FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56494 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h
index 2b089f3..62bec6f 100644
--- a/lib/Target/X86/X86InstrInfo.h
+++ b/lib/Target/X86/X86InstrInfo.h
@@ -414,6 +414,11 @@
///
virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
+ /// initializeGlobalBaseReg - Output the instructions required to put the
+ /// base address to use for accessing globals into a register.
+ ///
+ unsigned initializeGlobalBaseReg(MachineFunction *MF) const;
+
private:
MachineInstr* foldMemoryOperand(MachineFunction &MF,
MachineInstr* MI,