Have SelectionDAG's subtarget TargetSelectionDAGInfo be set

during init rather than construction time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-10-08 00:32:59 +00:00
parent 8d74900819
commit 6e36592a73

View File

@ -907,8 +907,7 @@ unsigned SelectionDAG::getEVTAlignment(EVT VT) const {
// EntryNode could meaningfully have debug info if we can find it...
SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
: TM(tm), TSI(tm.getSubtargetImpl()->getSelectionDAGInfo()), TLI(nullptr),
OptLevel(OL),
: TM(tm), TSI(nullptr), TLI(nullptr), OptLevel(OL),
EntryNode(ISD::EntryToken, 0, DebugLoc(), getVTList(MVT::Other)),
Root(getEntryNode()), NewNodesMustHaveLegalTypes(false),
UpdateListeners(nullptr) {
@ -919,6 +918,7 @@ SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
void SelectionDAG::init(MachineFunction &mf, const TargetLowering *tli) {
MF = &mf;
TLI = tli;
TSI = getSubtarget().getSelectionDAGInfo();
Context = &mf.getFunction()->getContext();
}