diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:51:13 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:51:13 +0000 |
commit | 740854bb1974642af77bec5e7f835e15115ad639 (patch) | |
tree | d2f3f80fe7e211c93e1d95c63eef58a862a1c7b4 | |
parent | c5d1a4ffd96528b49a9e34e06706f1499cd0fe80 (diff) |
Machine LICM increases register pressure and it almost always increase code size. For now, disable it for optimizing for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63856 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 76d5f37794..dd32977f90 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -126,6 +126,10 @@ static bool LoopIsOuterMostWithPreheader(MachineLoop *CurLoop) { /// loop. /// bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { + const Function *F = MF.getFunction(); + if (F->hasFnAttr(Attribute::OptimizeForSize)) + return false; + DOUT << "******** Machine LICM ********\n"; Changed = false; |