[llvm-commits] [llvm] r127167 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Mar 7 10:56:16 PST 2011
Author: stoklund
Date: Mon Mar 7 12:56:16 2011
New Revision: 127167
URL: http://llvm.org/viewvc/llvm-project?rev=127167&view=rev
Log:
Handle the special case of registers begin redefined by early-clobber defs.
In this case, the value need to be available at the load index instead of the
normal use index.
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=127167&r1=127166&r2=127167&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Mar 7 12:56:16 2011
@@ -779,6 +779,13 @@
if (VNI->isUnused())
continue;
NewLI.addRange(LiveRange(VNI->def, VNI->def.getNextSlot(), VNI));
+
+ // A use tied to an early-clobber def ends at the load slot and isn't caught
+ // above. Catch it here instead. This probably only ever happens for inline
+ // assembly.
+ if (VNI->def.isUse())
+ if (VNInfo *UVNI = li->getVNInfoAt(VNI->def.getLoadIndex()))
+ WorkList.push_back(std::make_pair(VNI->def.getLoadIndex(), UVNI));
}
// Keep track of the PHIs that are in use.
More information about the llvm-commits
mailing list