MachineRegisterInfo: Introduce isPhysRegUsed()
[oota-llvm.git] / lib / CodeGen / BranchFolding.cpp
index f2d1bf0a51f2ffc8c3e41d3895586f5de0de2897..260ab537053943759b8b17f997f82f0b68133f9d 100644 (file)
@@ -605,9 +605,7 @@ static bool ProfitableToMerge(MachineBasicBlock *MBB1,
   // branch instruction, which is likely to be smaller than the 2
   // instructions that would be deleted in the merge.
   MachineFunction *MF = MBB1->getParent();
-  if (EffectiveTailLen >= 2 &&
-      // FIXME: Use Function::optForSize().
-      MF->getFunction()->hasFnAttribute(Attribute::OptimizeForSize) &&
+  if (EffectiveTailLen >= 2 && MF->getFunction()->optForSize() &&
       (I1 == MBB1->begin() || I2 == MBB2->begin()))
     return true;