[PATCH] D140006: fix jump threading failing to update cloned dbg.values
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 05:29:20 PST 2022
probinson added a comment.
Style comments.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2053
continue;
-
+
UsesToRename.push_back(&U);
----------------
Please don't mix unrelated formatting/whitespace changes with a functional change.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2087
+ //Retargets llvm.dbg.value to any renamed variables
+ auto retargetDbgValueIfPossible = [&](Instruction *NewInst) -> bool {
----------------
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2097
+
+ DenseMap<Instruction *, Value *>::iterator I = ValueMapping.find(dbgValue);
+ if (I != ValueMapping.end()) {
----------------
This one is debatable, if you prefer to keep it as is that's okay.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2101
+ dbgInstruction->getContext(),
+ ValueAsMetadata::get(I->second)));
+ return true;
----------------
Indentation here doesn't look right; try using clang-format-patch?
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2144
New->setOperand(i, I->second);
- }
+ }
}
----------------
================
Comment at: llvm/test/Transforms/JumpThreading/thread-debug-info.ll:6
+; Test that the llvm.dbg.value calls in a threaded block are correctly targeting
+; the locals in their block, and not the unthreaded one
+define void @test2(i32 %cond1, i32 %cond2) {
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140006/new/
https://reviews.llvm.org/D140006
More information about the llvm-commits
mailing list