[llvm] r184620 - Prevent LiveRangeEdit from deleting bundled instructions.
Andrew Trick
atrick at apple.com
Fri Jun 21 17:33:49 PDT 2013
Author: atrick
Date: Fri Jun 21 19:33:48 2013
New Revision: 184620
URL: http://llvm.org/viewvc/llvm-project?rev=184620&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp?rev=184620&r1=184619&r2=184620&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp Fri Jun 21 19:33:48 2013
@@ -220,6 +220,10 @@ void LiveRangeEdit::eliminateDeadDef(Mac
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);
More information about the llvm-commits
mailing list