summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-22 01:07:21 +0000
committerEric Christopher <echristo@gmail.com>2014-05-22 01:07:21 +0000
commit0ecfbdf4ad64389ab9ed6f84cc9b893c50b4f736 (patch)
tree88bd5212f69e0c45c2b9874062306fe51db68886
parente43ecace70ac6e3ea327de1670e8ef315ebaf343 (diff)
downloadbcm5719-llvm-0ecfbdf4ad64389ab9ed6f84cc9b893c50b4f736.tar.gz
bcm5719-llvm-0ecfbdf4ad64389ab9ed6f84cc9b893c50b4f736.zip
Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
llvm-svn: 209374
-rw-r--r--llvm/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp b/llvm/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
index 4a1f9717bf7..45a837e69f6 100644
--- a/llvm/lib/Target/ARM64/ARM64ISelDAGToDAG.cpp
+++ b/llvm/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<ARM64Subtarget>()), 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<ARM64Subtarget>();
return SelectionDAGISel::runOnMachineFunction(MF);
}
OpenPOWER on IntegriCloud