[PATCH] D82678: [CGP] Set debug locations when optimizing phi types

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 08:43:55 PDT 2020


bjope added a comment.

Just want to clarify that my questions regarding "what about debug info" in the earlier patch introducing these phi-type-rewrites actually was about dbg.value rather than the debugloc:s. I kind of wanted to have test cases verifying that the the presence of dbg.value uses didn't impact the optimization (`-g` invariance). But also to see that the dbg.value uses were handled somehow (either being salvaged in some way or being properly invalidated).

Nevertheless, if we should focus on the DebugLoc:s here, the patch seems pretty harmless to me. There are often some different opinions about having debug locations on things that doesn't really map to something in the original source. Afaik not having debug locations could mess up stepping in a debugger a bit, while having locations could impact profiling and code coverage. As far as I can see you pick locations from the replaced och adjacent instruction, so you won't end up hoisting/sinking a location risking to impact code coverage.


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

https://reviews.llvm.org/D82678



More information about the llvm-commits mailing list