[llvm-commits] [llvm] r51440 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

David Greene greened at obbligato.org
Thu May 22 14:16:33 PDT 2008


Author: greened
Date: Thu May 22 16:16:33 2008
New Revision: 51440

URL: http://llvm.org/viewvc/llvm-project?rev=51440&view=rev
Log:

When rewriting defs and uses after spilling, don't set the weight of a
live interval to infinity if the instruction being rewritten is an
original remat def instruction.  We were only checking against the clone
of the remat def which doesn't actually appear in the IR at all.

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

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=51440&r1=51439&r2=51440&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Thu May 22 16:16:33 2008
@@ -1150,7 +1150,9 @@
     }
     MachineBasicBlock *MBB = MI->getParent();
 
-    if (ImpUse && MI != ReMatDefMI) {
+    // ReMatDefMI is a clone and not in the IR at all, so check
+    // RefMatOrigDefMI too.
+    if (ImpUse && MI != ReMatDefMI && MI != ReMatOrigDefMI) {
       // Re-matting an instruction with virtual register use. Update the
       // register interval's spill weight to HUGE_VALF to prevent it from
       // being spilled.





More information about the llvm-commits mailing list