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

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Nov 13 14:05:42 PST 2011


Author: stoklund
Date: Sun Nov 13 16:05:42 2011
New Revision: 144507

URL: http://llvm.org/viewvc/llvm-project?rev=144507&view=rev
Log:
Simplify early clobber slots a bit.

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=144507&r1=144506&r2=144507&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Nov 13 16:05:42 2011
@@ -197,11 +197,7 @@
   LiveVariables::VarInfo& vi = lv_->getVarInfo(interval.reg);
   if (interval.empty()) {
     // Get the Idx of the defining instructions.
-    SlotIndex defIndex = MIIdx.getRegSlot();
-    // Earlyclobbers move back one, so that they overlap the live range
-    // of inputs.
-    if (MO.isEarlyClobber())
-      defIndex = MIIdx.getRegSlot(true);
+    SlotIndex defIndex = MIIdx.getRegSlot(MO.isEarlyClobber());
 
     // Make sure the first definition is not a partial redefinition. Add an
     // <imp-def> of the full register.
@@ -323,9 +319,7 @@
       // are actually two values in the live interval.  Because of this we
       // need to take the LiveRegion that defines this register and split it
       // into two values.
-      SlotIndex RedefIndex = MIIdx.getRegSlot();
-      if (MO.isEarlyClobber())
-        RedefIndex = MIIdx.getRegSlot(true);
+      SlotIndex RedefIndex = MIIdx.getRegSlot(MO.isEarlyClobber());
 
       const LiveRange *OldLR =
         interval.getLiveRangeContaining(RedefIndex.getRegSlot(true));
@@ -402,10 +396,7 @@
   DEBUG(dbgs() << "\t\tregister: " << PrintReg(interval.reg, tri_));
 
   SlotIndex baseIndex = MIIdx;
-  SlotIndex start = baseIndex.getRegSlot();
-  // Earlyclobbers move back one.
-  if (MO.isEarlyClobber())
-    start = MIIdx.getRegSlot(true);
+  SlotIndex start = baseIndex.getRegSlot(MO.isEarlyClobber());
   SlotIndex end = start;
 
   // If it is not used after definition, it is considered dead at





More information about the llvm-commits mailing list