From 6e36592a73e1873b84cee82cef2a84a348d71753 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 8 Oct 2014 00:32:59 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 2322ce0104c..25532ec1ba7 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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(); } -- 2.34.1