From: Eric Christopher Date: Thu, 22 May 2014 01:07:21 +0000 (+0000) Subject: Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=162180cba5e30806f4da6b8442628ac435f030be;p=oota-llvm.git Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209374 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp b/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp index 4a1f9717bf7..45a837e69f6 100644 --- a/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp +++ b/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp @@ -45,7 +45,7 @@ class ARM64DAGToDAGISel : public SelectionDAGISel { public: explicit ARM64DAGToDAGISel(ARM64TargetMachine &tm, CodeGenOpt::Level OptLevel) : SelectionDAGISel(tm, OptLevel), TM(tm), - Subtarget(&TM.getSubtarget()), ForCodeSize(false) {} + Subtarget(nullptr), ForCodeSize(false) {} const char *getPassName() const override { return "ARM64 Instruction Selection"; @@ -57,6 +57,7 @@ public: FnAttrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::OptimizeForSize) || FnAttrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::MinSize); + Subtarget = &TM.getSubtarget(); return SelectionDAGISel::runOnMachineFunction(MF); }