[PATCH] D60831: [DebugInfo at O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion

Greg Bedwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 14:57:35 PDT 2019


gbedwell added a comment.

In D60831#1472303 <https://reviews.llvm.org/D60831#1472303>, @aprantl wrote:

> In D60831#1472296 <https://reviews.llvm.org/D60831#1472296>, @jmellorcrummey wrote:
>
> >
>
>
>
>
> > As the lead of a project building profiling tools, I am strongly against having any instructions map to line 0.
>
> This is probably not what you meant, but for completeness I feel like I should point out that there are many legitimate situations where LLVM generates a line 0 location. The most prominent example is instruction merging: Since both LLVM IR and DWARF currently require each PC address to map to exactly one source location, LLVM's will insert a line 0 location when it merges two instructions with distinct source locations. I can't speak for profiling, but at least on the debugger side, the consensus is that potentially misleading information is worse than no information, because if there is no way to distinguish "always correct" from "maybe correct" information, the user can't trust any information.


FWIW, the motivating case for the introduction of getMergedLocation, which generally handles the insertion of line 0 locations in this case was to improve the performance of profile-guided optimized code when using a sampling profiler tool (see http://llvm.org/devmtg/2017-03//assets/slides/delivering_sample_based_pgo_for_playstation_r_4.pdf ).


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

https://reviews.llvm.org/D60831





More information about the llvm-commits mailing list