[llvm-branch-commits] [llvm-branch] r83658 - in /llvm/branches/Apple/Leela: lib/CodeGen/MachineLICM.cpp test/CodeGen/X86/2009-10-08-MachineLICMBug.ll

Bill Wendling isanbard at gmail.com
Fri Oct 9 11:28:31 PDT 2009


Author: void
Date: Fri Oct  9 13:28:30 2009
New Revision: 83658

URL: http://llvm.org/viewvc/llvm-project?rev=83658&view=rev
Log:
$ svn merge -c 83622 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r83622 into '.':
A    test/CodeGen/X86/2009-10-08-MachineLICMBug.ll
U    lib/CodeGen/MachineLICM.cpp
$ svn merge -c 83624 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r83624 into '.':
G    lib/CodeGen/MachineLICM.cpp


Added:
    llvm/branches/Apple/Leela/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll
      - copied unchanged from r83622, llvm/trunk/test/CodeGen/X86/2009-10-08-MachineLICMBug.ll
Modified:
    llvm/branches/Apple/Leela/lib/CodeGen/MachineLICM.cpp

Modified: llvm/branches/Apple/Leela/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/MachineLICM.cpp?rev=83658&r1=83657&r2=83658&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/MachineLICM.cpp Fri Oct  9 13:28:30 2009
@@ -131,10 +131,6 @@
 /// loop.
 ///
 bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
-  const Function *F = MF.getFunction();
-  if (F->hasFnAttr(Attribute::OptimizeForSize))
-    return false;
-
   DEBUG(errs() << "******** Machine LICM ********\n");
 
   Changed = false;
@@ -326,8 +322,7 @@
   // FIXME: For now, only hoist re-materilizable instructions. LICM will
   // increase register pressure. We want to make sure it doesn't increase
   // spilling.
-  if (!TID.mayLoad() && (!TID.isRematerializable() ||
-                         !TII->isTriviallyReMaterializable(&MI)))
+  if (!TID.isRematerializable() || !TII->isTriviallyReMaterializable(&MI))
     return false;
 
   // If result(s) of this instruction is used by PHIs, then don't hoist it.





More information about the llvm-branch-commits mailing list