[all-commits] [llvm/llvm-project] 2f7c05: [DebugInfo][RemoveDIs] Allow speculative-DPMarker ...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Fri Nov 24 07:18:37 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2f7c050e1943f63af0823c1327b44579d0bdb584
https://github.com/llvm/llvm-project/commit/2f7c050e1943f63af0823c1327b44579d0bdb584
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M llvm/lib/IR/BasicBlock.cpp
Log Message:
-----------
[DebugInfo][RemoveDIs] Allow speculative-DPMarker creation
There's good justification for having a function specifying "I need there to be
a marker here, so return the marker there or create a new one". This was going
to come later in the series, but it's starting to become necessary much eariler
alas.
Make use of it in spliceDebugInfo, where we can occasionally splice DPValues
onto the end() iterator of a block while it's been edited.
Commit: 59fab2264217648ff11412666b69fb4c5fc9451c
https://github.com/llvm/llvm-project/commit/59fab2264217648ff11412666b69fb4c5fc9451c
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M llvm/include/llvm/Transforms/Utils/ValueMapper.h
M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
M llvm/lib/Transforms/Utils/CloneFunction.cpp
M llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/lib/Transforms/Utils/ValueMapper.cpp
M llvm/test/Transforms/LoopUnroll/runtime-epilog-debuginfo.ll
A llvm/test/Transforms/SimpleLoopUnswitch/debuginfo.ll
M llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
A llvm/test/Transforms/SimplifyCFG/jump-threading-debuginfo.ll
Log Message:
-----------
[DebugInfo][RemoveDIs] Support cloning and remapping DPValues (#72546)
This patch adds support for CloneBasicBlock duplicating the DPValues
attached to instructions, and adds facilities to remap them into their new
context. The plumbing to achieve this is fairly straightforwards and
mechanical.
I've also added illustrative uses to LoopUnrollRuntime, SimpleLoopUnswitch
and SimplifyCFG. The former only updates for the epilogue right now so I've
added CHECK lines just for the end of an unrolled loop (further updates
coming later). SimpleLoopUnswitch had no debug-info tests so I've added a
new one. The two modified parts of SimplifyCFG are covered by the two
modified SimplifyCFG tests.
These are scenarios where we have to do extra cloning for copying of
DPValues because they're no longer instructions, and remap them too.
Compare: https://github.com/llvm/llvm-project/compare/5e5a22caf88a...59fab2264217
More information about the All-commits
mailing list