[llvm] [DebugInfo][X86] Use merged DebugLoc in replaceBranchWithTailCall (PR #189509)
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 13:01:46 PDT 2026
ZequanWu wrote:
> Could you annotate the lines here to help understand the 3, 6, 4 sequence you're describing? I'm not quite following.
```
3 if (a == 0)
4 bar();
5 else if (a == 1)
6 bar();
7 else
```
> Perhaps it'd be best to introduce a new merging operation - some sort of "merge with fallback" where the merge can fallback to the first location specified (because it dominates all the other locations? or whatever logic we decide is the suitable condition for this fallback) and then the multilocation work can have its own implementation/branch in that merging function that merges all the locations, and preserves the fallback location as the one that a debugger not using multilocations would've seen without the feature.
That sounds good. I think the caller of the merge operation has to indicate which location is the dominating one. This is the only place that I can found we need this use dominating location for merging.
https://github.com/llvm/llvm-project/pull/189509
More information about the llvm-commits
mailing list