[llvm-commits] [llvm] r116081 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp

Evan Cheng evan.cheng at apple.com
Fri Oct 8 11:59:20 PDT 2010


Author: evancheng
Date: Fri Oct  8 13:59:19 2010
New Revision: 116081

URL: http://llvm.org/viewvc/llvm-project?rev=116081&view=rev
Log:
Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.

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=116081&r1=116080&r2=116081&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Fri Oct  8 13:59:19 2010
@@ -636,6 +636,10 @@
 }
 
 MachineInstr *MachineLICM::ExtractHoistableLoad(MachineInstr *MI) {
+  // Don't unfold simple loads.
+  if (MI->getDesc().canFoldAsLoad())
+    return 0;
+
   // If not, we may be able to unfold a load and hoist that.
   // First test whether the instruction is loading from an amenable
   // memory location.





More information about the llvm-commits mailing list