[llvm-commits] [PATCH] Preserve DebugInfo during LICM
clattner at apple.com
Sun Oct 11 11:58:04 PDT 2009
On Oct 8, 2009, at 2:23 AM, Török Edwin wrote:
Hi Edwin, sorry for the delay, I was hoping Devang would look at this.
> LICM currently sinks, and deletes debug stoppoints as dead
That is bad :).
> The attached patch disables sink/hoist of debuginfo (simplifycfg
> already knows to ignore debuginfo when checking if it can merge
> and also updates the debug info when sinking/hoisting instructions (by
> copying the stoppoints as needed).
Your change to not hoist debug intrinsics makes a lot of sense, please
commit. I don't think the UpdateDbgInfoForMotion part is needed
though. Devang is moving line # info to be metadata on instructions,
which will obsolete it.
> I think that we'd need another TEST.dbgquality that tests whether each
> basicblock has at least one stoppoint (if original did),
> and also outputs how many instructions have a stoppoint in same BB,
> many have a stoppoint
> foundable by findStopPointInst, and how many don't have at all. The
> would pass if each BB has at least one stoppoint,
I'm not sure what the right approach is here. When stoppoints move to
being on the instructions, we won't really need this. However, there
will be other forms of "poor debug info", for example, when we
optimizers will stomp on values used by @llvm.dbg.value, silently
pessimizing the debug info. It would be nice to have a way to find
the "bad" cases of these and fix them.
Thanks for working on this!
> and output an overall quality for each test, and for the entire
> What do you think?
> Best regards,
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
More information about the llvm-commits