diff options
Diffstat (limited to 'lib/Target/ARM/Thumb2SizeReduction.cpp')
-rw-r--r-- | lib/Target/ARM/Thumb2SizeReduction.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Target/ARM/Thumb2SizeReduction.cpp b/lib/Target/ARM/Thumb2SizeReduction.cpp index c51eb8b..2ee908b 100644 --- a/lib/Target/ARM/Thumb2SizeReduction.cpp +++ b/lib/Target/ARM/Thumb2SizeReduction.cpp @@ -1001,17 +1001,12 @@ bool Thumb2SizeReduce::ReduceMBB(MachineBasicBlock &MBB) { } bool Thumb2SizeReduce::runOnMachineFunction(MachineFunction &MF) { - const TargetMachine &TM = MF.getTarget(); - TII = static_cast<const Thumb2InstrInfo *>( - TM.getSubtargetImpl()->getInstrInfo()); - STI = &TM.getSubtarget<ARMSubtarget>(); + STI = &static_cast<const ARMSubtarget &>(MF.getSubtarget()); + TII = static_cast<const Thumb2InstrInfo *>(STI->getInstrInfo()); // Optimizing / minimizing size? - AttributeSet FnAttrs = MF.getFunction()->getAttributes(); - OptimizeSize = FnAttrs.hasAttribute(AttributeSet::FunctionIndex, - Attribute::OptimizeForSize); - MinimizeSize = - FnAttrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::MinSize); + OptimizeSize = MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize); + MinimizeSize = MF.getFunction()->hasFnAttribute(Attribute::MinSize); BlockInfo.clear(); BlockInfo.resize(MF.getNumBlockIDs()); |