diff options
author | Andrew Trick <atrick@apple.com> | 2013-06-22 00:33:48 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-06-22 00:33:48 +0000 |
commit | cbd7305d09a3ed6487af0c942456aa8ebb2e0d23 (patch) | |
tree | 4c35eafd4c80dc1831b725c6ba490a1e7af98de9 | |
parent | dee1bc98f9d9dcbb7ea60fc6af699ddda315955c (diff) | |
download | bcm5719-llvm-cbd7305d09a3ed6487af0c942456aa8ebb2e0d23.tar.gz bcm5719-llvm-cbd7305d09a3ed6487af0c942456aa8ebb2e0d23.zip |
Prevent LiveRangeEdit from deleting bundled instructions.
We have no targets on trunk that bundle before regalloc. However, we
have been advertising regalloc as bundle safe for use with out-of-tree
targets. We need to at least contain the parts of the code that are
still unsafe.
llvm-svn: 184620
-rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index d215d0c28a4..792ef5405e2 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -220,6 +220,10 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) { assert(MI->allDefsAreDead() && "Def isn't really dead"); SlotIndex Idx = LIS.getInstructionIndex(MI).getRegSlot(); + // Never delete a bundled instruction. + if (MI->isBundled()) { + return; + } // Never delete inline asm. if (MI->isInlineAsm()) { DEBUG(dbgs() << "Won't delete: " << Idx << '\t' << *MI); |