[PATCH] D70318: Recover debug intrinsics when killing duplicate or empty basic blocks
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 09:03:34 PST 2019
StephenTozer created this revision.
StephenTozer added reviewers: probinson, aprantl, vsk, markus, djtodoro.
StephenTozer added a project: debug-info.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Fixes the bug: https://bugs.llvm.org/show_bug.cgi?id=39339
When basic blocks are killed, either due to being empty or to being an if.then or if.else block whose complement contains identical instructions, the debug intrinsics in that block are lost. This fix attempts to recover those intrinsics by either hoisting or sinking them if possible, or replacing them in the above block with Undef values to prevent debug info from falling out-of-date.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70318
Files:
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/CodeGen/LiveDebugValues.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-else.ll
llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-empty.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70318.229567.patch
Type: text/x-patch
Size: 22782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191115/ec595a8f/attachment-0001.bin>
More information about the llvm-commits
mailing list