[llvm] 6a9a95b - [Analysis][NFC] Address review comments from PR #213013 (#225800)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 01:14:36 PDT 2026
Author: David Sherwood
Date: 2026-09-25T09:14:27+01:00
New Revision: 6a9a95bf0c62cccbffed5b481b40cdbae8a5c959
URL: https://github.com/llvm/llvm-project/commit/6a9a95bf0c62cccbffed5b481b40cdbae8a5c959
DIFF: https://github.com/llvm/llvm-project/commit/6a9a95bf0c62cccbffed5b481b40cdbae8a5c959.diff
LOG: [Analysis][NFC] Address review comments from PR #213013 (#225800)
Added:
Modified:
llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h b/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
index 4470de17518db..48bdd0c5a1e00 100644
--- a/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
+++ b/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
@@ -79,6 +79,9 @@ class SCEVExpander : public SCEVUseVisitor<SCEVExpander, Value *> {
InsertedExpressions;
// InsertedOverflowChecks caches Values for reuse, so must track RAUW.
+ // The key is a tuple containing the trip count for the loop, the absolute
+ // value of the recurrence step, and the insert point. The stored pair values
+ // are the multiply result and a boolean value indicating overflow.
DenseMap<std::tuple<Value *, Value *, Instruction *>,
std::pair<TrackingVH<Value>, TrackingVH<Value>>>
InsertedOverflowChecks;
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index 87109a5d9ffb1..7ce2542551fff 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -2371,7 +2371,7 @@ Value *SCEVExpander::generateOverflowCheck(const SCEVAddRecExpr *AR,
OfMul = Builder.CreateExtractValue(Mul, 1, "mul.overflow");
// The type Ty is already encoded in AbsStep.
- InsertedOverflowChecks[Key] = std::pair<Value *, Value *>(MulV, OfMul);
+ InsertedOverflowChecks[Key] = {MulV, OfMul};
}
Value *Add = nullptr, *Sub = nullptr;
More information about the llvm-commits
mailing list