[llvm-commits] [llvm] r60092 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h lib/CodeGen/LiveIntervalAnalysis.cpp

Dan Gohman gohman at apple.com
Tue Nov 25 21:50:31 PST 2008


Author: djg
Date: Tue Nov 25 23:50:31 2008
New Revision: 60092

URL: http://llvm.org/viewvc/llvm-project?rev=60092&view=rev
Log:
LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

Modified:
    llvm/trunk/include/llvm/CodeGen/LiveInterval.h
    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=60092&r1=60091&r2=60092&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Tue Nov 25 23:50:31 2008
@@ -9,7 +9,7 @@
 //
 // This file implements the LiveRange and LiveInterval classes.  Given some
 // numbering of each the machine instructions an interval [i, j) is said to be a
-// live interval for register v if there is no instruction with number j' > j
+// live interval for register v if there is no instruction with number j' >= j
 // such that v is live at j' and there is no instruction with number i' < i such
 // that v is live at i'. In this implementation intervals can have holes,
 // i.e. an interval might look like [1,20), [50,65), [1000,1001).  Each

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

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Nov 25 23:50:31 2008
@@ -750,7 +750,7 @@
 
   bool ResVal = false;
   while (I != Idx2MBBMap.end()) {
-    if (I->first > End)
+    if (I->first >= End)
       break;
     MBBs.push_back(I->second);
     ResVal = true;





More information about the llvm-commits mailing list