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

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Oct 5 09:51:21 PDT 2011


Author: stoklund
Date: Wed Oct  5 11:51:21 2011
New Revision: 141187

URL: http://llvm.org/viewvc/llvm-project?rev=141187&view=rev
Log:
Add a FIXME.

TwoAddressInstructionPass should annotate instructions with <undef>
flags when it lower REG_SEQUENCE instructions.  LiveIntervals should not
be in the business of modifying code (except for kill flags, perhaps).

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=141187&r1=141186&r2=141187&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Oct  5 11:51:21 2011
@@ -304,6 +304,10 @@
 
     // Make sure the first definition is not a partial redefinition. Add an
     // <imp-def> of the full register.
+    // FIXME: LiveIntervals shouldn't modify the code like this.  Whoever
+    // created the machine instruction should annotate it with <undef> flags
+    // as needed.  Then we can simply assert here.  The REG_SEQUENCE lowering
+    // is the main suspect.
     if (MO.getSubReg()) {
       mi->addRegisterDefined(interval.reg);
       // Mark all defs of interval.reg on this instruction as reading <undef>.





More information about the llvm-commits mailing list