[all-commits] [llvm/llvm-project] f0b552: [DebugInfo][RemoveDIs] Instrument loop-rotate for ...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Sun Nov 26 14:58:09 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0b5527b793413e40bfe1db799d9188e9180b53d
https://github.com/llvm/llvm-project/commit/f0b5527b793413e40bfe1db799d9188e9180b53d
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2023-11-26 (Sun, 26 Nov 2023)
Changed paths:
M llvm/include/llvm/IR/DebugInfoMetadata.h
M llvm/lib/IR/DebugInfoMetadata.cpp
M llvm/lib/Transforms/Utils/Local.cpp
M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
M llvm/test/Transforms/LoopRotate/dbgvalue.ll
Log Message:
-----------
[DebugInfo][RemoveDIs] Instrument loop-rotate for DPValues (#72997)
Loop-rotate manually maintains dbg.value intrinsics -- it also needs to
manually maintain the replacement for dbg.value intrinsics, DPValue
objects. For the most part this patch adds parallel implementations
using the new type Some extra juggling is needed when loop-rotate hoists
loop-invariant instructions out of the loop: the DPValues attached to
such an instruction need to get rotated but not hoisted. Exercised by
the new test function invariant_hoist in dbgvalue.ll.
There's also a "don't insert duplicate debug intrinsics" facility in
LoopRotate. The value and correctness of this isn't clear, but to
continue preserving behaviour that's now tested in the "tak_dup"
function in dbgvalue.ll.
Other things in this patch include a helper DebugVariable constructor
for DPValues, a insertDebugValuesForPHIs handler for RemoveDIs
(exercised by the new tests), and beefing up the dbg.value checking in
dbgvalue.ll to ensure that each record is tested (and that there's an
implicit check-not).
More information about the All-commits
mailing list