[llvm] [DebugInfo][RemoveDIs] Instrument jump-threading to update DPValues (PR #73127)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 06:45:10 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff ed5404cd6b20ef6b54ef713399f03857990861a8 effd2c3845694e967f2c68e0b9d84f87e44a242f -- llvm/include/llvm/Transforms/Utils/SSAUpdater.h llvm/lib/Transforms/Scalar/JumpThreading.cpp llvm/lib/Transforms/Utils/SSAUpdater.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Transforms/Utils/SSAUpdater.h b/llvm/include/llvm/Transforms/Utils/SSAUpdater.h
index 551fed785c..c79d436fc6 100644
--- a/llvm/include/llvm/Transforms/Utils/SSAUpdater.h
+++ b/llvm/include/llvm/Transforms/Utils/SSAUpdater.h
@@ -124,8 +124,7 @@ public:
void UpdateDebugValues(Instruction *I);
void UpdateDebugValues(Instruction *I,
SmallVectorImpl<DbgValueInst *> &DbgValues);
- void UpdateDebugValues(Instruction *I,
- SmallVectorImpl<DPValue *> &DbgValues);
+ void UpdateDebugValues(Instruction *I, SmallVectorImpl<DPValue *> &DbgValues);
/// Rewrite a use like \c RewriteUse but handling in-block definitions.
///
diff --git a/llvm/lib/Transforms/Utils/SSAUpdater.cpp b/llvm/lib/Transforms/Utils/SSAUpdater.cpp
index eda9d17296..d5589b3f4b 100644
--- a/llvm/lib/Transforms/Utils/SSAUpdater.cpp
+++ b/llvm/lib/Transforms/Utils/SSAUpdater.cpp
@@ -206,7 +206,7 @@ void SSAUpdater::UpdateDebugValues(Instruction *I) {
continue;
UpdateDebugValue(I, DbgValue);
}
- for (auto &DPV: DPValues) {
+ for (auto &DPV : DPValues) {
if (DPV->getParent() == I->getParent())
continue;
UpdateDebugValue(I, DPV);
@@ -242,8 +242,7 @@ void SSAUpdater::UpdateDebugValue(Instruction *I, DPValue *DPV) {
if (HasValueForBlock(UserBB)) {
Value *NewVal = GetValueAtEndOfBlock(UserBB);
DPV->replaceVariableLocationOp(I, NewVal);
- }
- else
+ } else
DPV->setKillLocation();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/73127
More information about the llvm-commits
mailing list