[llvm-branch-commits] [llvm] Propagate DebugLocs on phis in BreakCriticalEdges (PR #133492)
Stephen Tozer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 6 02:50:04 PDT 2025
SLTozer wrote:
> I'm also not 100% sure if there's a good "policy" in place for PHI debug locs (paging @SLTozer)
In most cases we do not set debug locs on PHI nodes or expect them to have debug locs, but there are some cases where we explicitly set/check them - most often in loop optimizations, where PHIs may have source locations relevant to the loop induction variable, and in InstCombine where we perform transformations between ordinary instructions and PHIs. I don't _think_ we have a well-defined policy in place, but since they're sometimes useful it's a good rule-of-thumb to propagate them if doing so makes sense.
https://github.com/llvm/llvm-project/pull/133492
More information about the llvm-branch-commits
mailing list