aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2025-07-18 11:31:52 +0100
committerGitHub <noreply@github.com>2025-07-18 11:31:52 +0100
commitc9d8b68676dbf51996a76475313088f750697343 (patch)
treeb173298135c208fd7e1869ca6764b314085ed46f /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parent4fbe88fc46989b5b4e3b8913a915c7a3cd188bdf (diff)
downloadllvm-c9d8b68676dbf51996a76475313088f750697343.zip
llvm-c9d8b68676dbf51996a76475313088f750697343.tar.gz
llvm-c9d8b68676dbf51996a76475313088f750697343.tar.bz2
[DebugInfo] Suppress lots of users of DbgValueInst (#149476)
This is another prune of dead code -- we never generate debug intrinsics nowadays, therefore there's no need for these codepaths to run. --------- Co-authored-by: Nikita Popov <github@npopov.com>
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 66d0573..06115e0 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -161,29 +161,8 @@ static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader,
SmallVector<DbgValueInst *, 1> DbgValues;
SmallVector<DbgVariableRecord *, 1> DbgVariableRecords;
llvm::findDbgValues(DbgValues, OrigHeaderVal, &DbgVariableRecords);
- for (auto &DbgValue : DbgValues) {
- // The original users in the OrigHeader are already using the original
- // definitions.
- BasicBlock *UserBB = DbgValue->getParent();
- if (UserBB == OrigHeader)
- continue;
-
- // Users in the OrigPreHeader need to use the value to which the
- // original definitions are mapped and anything else can be handled by
- // the SSAUpdater. To avoid adding PHINodes, check if the value is
- // available in UserBB, if not substitute poison.
- Value *NewVal;
- if (UserBB == OrigPreheader)
- NewVal = OrigPreHeaderVal;
- else if (SSA.HasValueForBlock(UserBB))
- NewVal = SSA.GetValueInMiddleOfBlock(UserBB);
- else
- NewVal = PoisonValue::get(OrigHeaderVal->getType());
- DbgValue->replaceVariableLocationOp(OrigHeaderVal, NewVal);
- }
+ assert(DbgValues.empty());
- // RemoveDIs: duplicate implementation for non-instruction debug-info
- // storage in DbgVariableRecords.
for (DbgVariableRecord *DVR : DbgVariableRecords) {
// The original users in the OrigHeader are already using the original
// definitions.