Stop adding <imp-def> operands when expanding REG_SEQUENCE.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 17 Sep 2012 23:03:21 +0000 (23:03 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 17 Sep 2012 23:03:21 +0000 (23:03 +0000)
These extra operands are not needed by register allocators using
VirtRegRewriter, and RAFast don't need them any longer.

By omitting the <imp-def> operands, it becomes possible for the new
register coalescer to track which lanes are valid and which are undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164073 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TwoAddressInstructionPass.cpp

index bd12f921328741756dcbe331cf4582e3a8736e44..df33a94ca76b40602a3cd50047de536eaf95b0ef 100644 (file)
@@ -1758,10 +1758,6 @@ bool TwoAddressInstructionPass::EliminateRegSequences() {
         if (MO.isReg() && MO.isDef() && MO.getReg() == DstReg)
           MO.setIsUndef();
       }
-      // Make sure there is a full non-subreg imp-def operand on the
-      // instruction.  This shouldn't be necessary, but it seems that at least
-      // RAFast requires it.
-      Def->addRegisterDefined(DstReg, TRI);
       DEBUG(dbgs() << "First def: " << *Def);
     }