Debug Info: Move DIEDwarfExpression into DwarfExpression.h because it
[oota-llvm.git] / lib / CodeGen / DeadMachineInstructionElim.cpp
index 48213c12e04beff282a27017ecc0f486ad880302..c17a35d1c73458f060bba871dba13d1023a37cd9 100644 (file)
@@ -59,6 +59,10 @@ bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const {
   if (MI->isInlineAsm())
     return false;
 
+  // Don't delete frame allocation labels.
+  if (MI->getOpcode() == TargetOpcode::FRAME_ALLOC)
+    return false;
+
   // Don't delete instructions with side effects.
   bool SawStore = false;
   if (!MI->isSafeToMove(TII, nullptr, SawStore) && !MI->isPHI())