Have the selection dag grab TargetLowering off of the subtarget

inside init rather than have it passed in as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-10-08 01:57:58 +00:00
parent 8315bd8ab0
commit 48b1918a1b
3 changed files with 4 additions and 5 deletions

View File

@ -268,7 +268,7 @@ public:
/// init - Prepare this SelectionDAG to process code in the given
/// MachineFunction.
///
void init(MachineFunction &mf, const TargetLowering *TLI);
void init(MachineFunction &mf);
/// clear - Clear state and free memory necessary to make this
/// SelectionDAG ready to process a new block.

View File

@ -915,9 +915,9 @@ SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
DbgInfo = new SDDbgInfo();
}
void SelectionDAG::init(MachineFunction &mf, const TargetLowering *tli) {
void SelectionDAG::init(MachineFunction &mf) {
MF = &mf;
TLI = tli;
TLI = getSubtarget().getTargetLowering();
TSI = getSubtarget().getSelectionDAGInfo();
Context = &mf.getFunction()->getContext();
}

View File

@ -413,7 +413,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
const Function &Fn = *mf.getFunction();
const TargetInstrInfo &TII = *TM.getSubtargetImpl()->getInstrInfo();
const TargetRegisterInfo &TRI = *TM.getSubtargetImpl()->getRegisterInfo();
const TargetLowering *TLI = TM.getSubtargetImpl()->getTargetLowering();
MF = &mf;
RegInfo = &MF->getRegInfo();
@ -433,7 +432,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
SplitCriticalSideEffectEdges(const_cast<Function&>(Fn), this);
CurDAG->init(*MF, TLI);
CurDAG->init(*MF);
FuncInfo->set(Fn, *MF, CurDAG);
if (UseMBPI && OptLevel != CodeGenOpt::None)