From 0e6e7cf385ca3f269e40a482a625a44290a0a2e4 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 22 May 2014 02:00:27 +0000 Subject: [PATCH] Override runOnMachineFunction for ARMISelDAGToDAG so that we can reset the subtarget on each function. llvm-svn: 209386 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index 8577c8a..08d598d 100644 --- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -73,6 +73,13 @@ public: Subtarget(&TM.getSubtarget()) { } + bool runOnMachineFunction(MachineFunction &MF) override { + // Reset the subtarget each time through. + Subtarget = &TM.getSubtarget(); + SelectionDAGISel::runOnMachineFunction(MF); + return true; + } + const char *getPassName() const override { return "ARM Instruction Selection"; } -- 2.7.4