[PATCH] D35437: Don't break bundles when adding DBG_VALUE

mattias.v.eriksson@ericsson.com via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 01:53:44 PDT 2017


materi added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:671
         for (auto &SP : Spills)
-          MBB->insertAfter(MachineBasicBlock::iterator(*SP.SpillInst),
-                           SP.DebugInst);
+          if( ! SP.SpillInst->isBundledWithSucc() ) // Don't break bundles.
+            MBB->insertAfter(MachineBasicBlock::iterator(*SP.SpillInst),
----------------
wolfgangp wrote:
> probinson wrote:
> > Please add a FIXME to preserve these DBG_VALUEs.  I don't know how to do that, but losing them is not great.
> I agree with Paul here. The DBG_VALUE instruction should be inserted after the bundle then.
But we must not put the DBG_VALUE after the bundle if the bundle also modifies the frame pointer. We recently had such a bug in my out-of-tree back-end.

I think moving a DBG_VALUE will require some analysis to make sure the live range is not moved.


https://reviews.llvm.org/D35437





More information about the llvm-commits mailing list