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 | 529616299f109f58e2a8217a1a760ba961266459 (patch) | |
tree | ba85e98d646aa16f01704f634e6dad032ceb7c24 | |
parent | 2ea475cddf42ce3421f0463be670c77c93329b2c (diff) | |
download | external_llvm-529616299f109f58e2a8217a1a760ba961266459.zip external_llvm-529616299f109f58e2a8217a1a760ba961266459.tar.gz external_llvm-529616299f109f58e2a8217a1a760ba961266459.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184620 91177308-0d34-0410-b5e6-96231b3b80d8
-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 d215d0c..792ef54 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/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); |