diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-19 23:34:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-19 23:34:59 +0000 |
commit | 7ebed91fddbcd259d03c4b438719ac1ce2a4fc87 (patch) | |
tree | ad2dfa847de2a06219ea704c33e2ae5c49b11cac /lib/CodeGen/LiveRangeEdit.cpp | |
parent | 9012c57e18d76d562b1f3e60bf19cccefa7b793e (diff) |
Fix 12892.
Dead code elimination during coalescing could cause a virtual register
to be split into connected components. The following rewriting would be
confused about the already joined copies present in the code, but
without a corresponding value number in the live range.
Erase all joined copies instantly when joining intervals such that the
MI and LiveInterval representations are always in sync.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index 8bdad5a4ff..4c2b0bffa6 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/lib/CodeGen/LiveRangeEdit.cpp @@ -308,6 +308,10 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead, TheDelegate->LRE_DidCloneVirtReg(Dups.back()->reg, LI->reg); } ConEQ.Distribute(&Dups[0], MRI); + DEBUG({ + for (unsigned i = 0; i != NumComp; ++i) + dbgs() << '\t' << *Dups[i] << '\n'; + }); } } |