[llvm-commits] [llvm] r168021 - /llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Andrew Trick atrick at apple.com
Wed Nov 14 18:32:22 PST 2012


Author: atrick
Date: Wed Nov 14 20:32:22 2012
New Revision: 168021

URL: http://llvm.org/viewvc/llvm-project?rev=168021&view=rev
Log:
Fix an obvious merge bug in -join-globalcopies (disabled).

Jakub Staszak spotted this in review. I don't notice these things
until I manually rerun benchmarks. But reducing unit tests is a very
high priority.

Modified:
    llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=168021&r1=168020&r2=168021&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Wed Nov 14 20:32:22 2012
@@ -2080,8 +2080,10 @@
   unsigned CurrDepth = UINT_MAX;
   for (unsigned i = 0, e = MBBs.size(); i != e; ++i) {
     // Try coalescing the collected local copies for deeper loops.
-    if (JoinGlobalCopies && MBBs[i].Depth < CurrDepth)
+    if (JoinGlobalCopies && MBBs[i].Depth < CurrDepth) {
       coalesceLocals();
+      CurrDepth = MBBs[i].Depth;
+    }
     copyCoalesceInMBB(MBBs[i].MBB);
   }
   coalesceLocals();





More information about the llvm-commits mailing list