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

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 14:43:42 PDT 2019


probinson added a comment.

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.
This is at the end of CodeGen when we're turning machine instructions into assembler text, so the phis have long since been translated to machine instructions or evaporated, but the idea is the same.


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

https://reviews.llvm.org/D59417





More information about the llvm-commits mailing list