From: Evan Cheng Date: Thu, 5 Feb 2009 08:51:13 +0000 (+0000) Subject: Machine LICM increases register pressure and it almost always increase code size... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=740854bb1974642af77bec5e7f835e15115ad639;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 76d5f377949..dd32977f90b 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;