[PATCH] D100137: [JumpThreading] merge debug info when merging select+br

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 13:41:40 PDT 2021


nickdesaulniers created this revision.
nickdesaulniers added a reviewer: dblaikie.
Herald added a subscriber: hiraditya.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Jump threading can replace select then unconditional branch with
conditional branch, but when doing so looses debug info. This is a text
book case for merging debug info locations.

This destructive transform is eventually leading to a failed Verifier
run during full LTO builds of the Linux kernel with CFI and KCOV
enabled.

Link: b/184085493
Link: https://bugs.llvm.org/show_bug.cgi?id=39531
Link: https://www.llvm.org/docs/HowToUpdateDebugInfo.html#when-to-merge-instruction-locations
Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100137

Files:
  llvm/lib/Transforms/Scalar/JumpThreading.cpp
  llvm/test/Transforms/JumpThreading/branch-debug-info2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100137.336211.patch
Type: text/x-patch
Size: 6103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210408/7d9e1264/attachment.bin>


More information about the llvm-commits mailing list