Override runOnMachineFunction for ARMISelDAGToDAG so that we can

reset the subtarget on each function.

llvm-svn: 209386
This commit is contained in:
Eric Christopher 2014-05-22 02:00:27 +00:00
parent d48cb047e4
commit 0e6e7cf385
1 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,13 @@ public:
Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
}
bool runOnMachineFunction(MachineFunction &MF) override {
// Reset the subtarget each time through.
Subtarget = &TM.getSubtarget<ARMSubtarget>();
SelectionDAGISel::runOnMachineFunction(MF);
return true;
}
const char *getPassName() const override {
return "ARM Instruction Selection";
}