[PATCH] D100446: [Transforms][Debugify] Fix "Missing line" false alarm on PHI nodes

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 13:57:16 PDT 2021


vsk resigned from this revision.
vsk edited reviewers, added: aprantl, djtodoro, probinson; removed: vsk.
vsk added a comment.

Context: In D59417 <https://reviews.llvm.org/D59417> (see also llvm.org/PR37964), there was some debate about whether it's worthwhile to assign a line 0 location to a phi instruction which would otherwise not have a location. The consensus seemed to be: no, it's not worth it. So D75242 <https://reviews.llvm.org/D75242> was spun off to suppress the false positive in debugify. It looks like D75242 <https://reviews.llvm.org/D75242> had the unexpected/unfortunate side-effect of introducing a new FP: any unique, preserved DebugLoc attached to a phi instruction because "missing".

My two cents is that a total ban on attaching debug location/intrinsic info to phi instructions isn't the best way to fix this. That would lead to a loss in test coverage (we do see cases where passes copy debug locations from phi instructions, or where debug intrinsics refer to phi instructions). I think the current version of this patch (skip the warning on phi instructions) does the right thing. That said I'm no longer very active in debug info reviews so I'll defer to other reviewers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100446



More information about the llvm-commits mailing list