diff options
author | Sanjay Patel <spatel@rotateright.com> | 2015-08-10 23:07:26 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2015-08-10 23:07:26 +0000 |
commit | d967a878fab52807fe38d47bbe711ebf26d6f49f (patch) | |
tree | 398a8f4f6119cd0a4e8617574b438d02a507bae5 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 0bc068728ec4cc87361c2425225611731b364803 (diff) | |
download | bcm5719-llvm-d967a878fab52807fe38d47bbe711ebf26d6f49f.tar.gz bcm5719-llvm-d967a878fab52807fe38d47bbe711ebf26d6f49f.zip |
fix minsize detection: minsize attribute implies optimizing for size
llvm-svn: 244528
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index f2d1bf0a51f..260ab537053 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -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; |