[PATCH] D59417: [GVN] Add default debug location when constructing PHI nodes

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 10:42:26 PDT 2019


vsk added a comment.

In D59417#1431496 <https://reviews.llvm.org/D59417#1431496>, @probinson wrote:

> In D59417#1431369 <https://reviews.llvm.org/D59417#1431369>, @vsk wrote:
>
> > > As for instructions at the start of the block - I'm pretty sure that a while back @probinson made a change to ensure that cascade locations couldn't occur at the start of a block (that we'd set to line zero down in the AsmPrinter/DwarfDebug if that occurred) so we shouldn't end up with super weird/layout-based cascade locations for instructions generated from phis at the start of blocks.
> >
> > That makes sense. What if a block has multiple phis? I.e. if the first phi in a block has a location but the second phi doesn't, is that a bug, or do we expect the location to cascade?
>
>
> Locations cascade, with one exception: If the first instruction after a label does not have an explicit source location, we emit line 0.


That sounds like a sensible rule. Presumably that line 0 location has the correct scope set. Shall I relax the debugify verifier so that it only diagnoses non-phi instructions without locations? I.e. are phis special in some way, or would the relaxed check still be too strict (& any 'no location' diagnostic could be noisy)?


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

https://reviews.llvm.org/D59417





More information about the llvm-commits mailing list