[all-commits] [llvm/llvm-project] 237d4e: [JumpThreading] merge debug info when merging sele...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Mon Apr 12 17:57:31 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 237d4ee8358e7eee8471c9e12faf1932cc6408ee
https://github.com/llvm/llvm-project/commit/237d4ee8358e7eee8471c9e12faf1932cc6408ee
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2021-04-12 (Mon, 12 Apr 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/JumpThreading.cpp
A llvm/test/Transforms/JumpThreading/branch-debug-info2.ll
Log Message:
-----------
[JumpThreading] merge debug info when merging select+br
Jump threading can replace select then unconditional branch with
conditional branch, but when doing so loses debug info.
This destructive transform is eventually leading to a failed Verifier
run during full LTO builds of the Linux kernel with CFI and KCOV
enabled, as reported in PR39531.
ModuleSanitizerCoveragePass will insert calls to
__sanitizer_cov_trace_pc, and sometimes split critical edges,
using whatever debug info may or may not exist for the branch for
the added libcall. Since we can inline calls to
__sanitizer_cov_trace_pc due to LTO, this can lead to the error
observed in PR39531 when the debug info isn't propagated to
the libcall, because of prior destructive transforms that failed to
retain debug info.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D100137
More information about the All-commits
mailing list