[llvm] 8ed8d37 - [SCEV] Update SCEVLoopGuardRewriter to hold reference to map. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 13 01:42:20 PST 2021
Author: Florian Hahn
Date: 2021-11-13T09:39:14Z
New Revision: 8ed8d370880b5c4e7bbf52b50791710a9f4f834b
URL: https://github.com/llvm/llvm-project/commit/8ed8d370880b5c4e7bbf52b50791710a9f4f834b
DIFF: https://github.com/llvm/llvm-project/commit/8ed8d370880b5c4e7bbf52b50791710a9f4f834b.diff
LOG: [SCEV] Update SCEVLoopGuardRewriter to hold reference to map. (NFC)
SCEVLoopGuardRewriter doesn't need to copy the rewrite map. It can just
hold a const reference instead, to avoid an unnecessary copy.
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index d7effde8eec2f..5bdbe4029eb42 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -13696,7 +13696,7 @@ ScalarEvolution::computeSymbolicMaxBackedgeTakenCount(const Loop *L) {
///
/// At the moment only rewriting SCEVUnknown is supported.
class SCEVLoopGuardRewriter : public SCEVRewriteVisitor<SCEVLoopGuardRewriter> {
- DenseMap<const SCEV *, const SCEV *> Map;
+ const DenseMap<const SCEV *, const SCEV *> ⤅
public:
SCEVLoopGuardRewriter(ScalarEvolution &SE,
More information about the llvm-commits
mailing list