[llvm-commits] [llvm] r63856 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp
Evan Cheng
evan.cheng at apple.com
Thu Feb 5 00:51:13 PST 2009
Author: evancheng
Date: Thu Feb 5 02:51:13 2009
New Revision: 63856
URL: http://llvm.org/viewvc/llvm-project?rev=63856&view=rev
Log:
Machine LICM increases register pressure and it almost always increase code size. For now, disable it for optimizing for size.
Modified:
llvm/trunk/lib/CodeGen/MachineLICM.cpp
Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=63856&r1=63855&r2=63856&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Thu Feb 5 02:51:13 2009
@@ -126,6 +126,10 @@
/// loop.
///
bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
+ const Function *F = MF.getFunction();
+ if (F->hasFnAttr(Attribute::OptimizeForSize))
+ return false;
+
DOUT << "******** Machine LICM ********\n";
Changed = false;
More information about the llvm-commits
mailing list