[PATCH] D81198: [docs] Specify rules for updating debug locations

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 12:42:11 PDT 2020


jmorse added a comment.

Greatly enjoying the fact that the rationale behind each rule is explained, thanks for putting this together.



================
Comment at: llvm/docs/HowToUpdateDebugInfo.rst:29-32
+A transformation must preserve the debug location of an instruction if the
+instruction either remains in its basic block, or if its basic block is folded
+into a *unique* predecessor. The APIs to use are ``IRBuilder``, or
+``Instruction::setDebugLoc``.
----------------
dblaikie wrote:
> vsk wrote:
> > dblaikie wrote:
> > > Is this kind of "must" language consistent with the rest of this document? In this case it's an aspirational, sort of "this is ideal/what we're striving for" rather than "if you don't do this it'll fail the verifier/break", etc?
> > This is aspirational -- would "should" be more appropriate?
> "should" sounds right to me - but open  to other folks preferences/ideas about how this should be framed
Do you see this rule as covering tail duplication? AFAIUI preserving the location when tail duplicating is correct, but involves multiple non-unique predecessors. (Or, I misunderstand unique here).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81198/new/

https://reviews.llvm.org/D81198





More information about the llvm-commits mailing list