[llvm-commits] [llvm] r45354 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Chris Lattner sabre at nondot.org
Tue Dec 25 11:06:46 PST 2007


Author: lattner
Date: Tue Dec 25 13:06:45 2007
New Revision: 45354

URL: http://llvm.org/viewvc/llvm-project?rev=45354&view=rev
Log:
Don't break critical edges for single-bb loops, this helps with PR1877, though
it is only a partial fix.  This change is noise for most programs, but
speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%,
hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc.

OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info).


Modified:
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=45354&r1=45353&r2=45354&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Tue Dec 25 13:06:45 2007
@@ -37,8 +37,6 @@
 namespace {
   cl::opt<bool> OptExtUses("optimize-ext-uses",
                            cl::init(true), cl::Hidden);
-  // LLCBETA option.
-  cl::opt<bool> DontHackBackedge("backedge-hack", cl::Hidden);
 }
 
 namespace {  
@@ -280,7 +278,7 @@
   // As a hack, never split backedges of loops.  Even though the copy for any
   // PHIs inserted on the backedge would be dead for exits from the loop, we
   // assume that the cost of *splitting* the backedge would be too high.
-  if (DontHackBackedge && Dest == TIBB)
+  if (Dest == TIBB)
     return;
   
   /// TIPHIValues - This array is lazily computed to determine the values of





More information about the llvm-commits mailing list