[llvm-branch-commits] [llvm] 9a7c03b - [SCEV] Remove unused getOrInsertCanonicalInductionVariable (NFC)
Kazu Hirata via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Jan 9 09:29:56 PST 2021
Author: Kazu Hirata
Date: 2021-01-09T09:24:56-08:00
New Revision: 9a7c03b80092d8efb57f7176d14b2bfa7743f245
URL: https://github.com/llvm/llvm-project/commit/9a7c03b80092d8efb57f7176d14b2bfa7743f245
DIFF: https://github.com/llvm/llvm-project/commit/9a7c03b80092d8efb57f7176d14b2bfa7743f245.diff
LOG: [SCEV] Remove unused getOrInsertCanonicalInductionVariable (NFC)
The last use was removed on Mar 22, 2012 in commit
f47d0af5515bee47dfd000363740fe347bb6cd18.
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 68eccdfd011d..547245cfb963 100644
--- a/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
+++ b/llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
@@ -247,12 +247,6 @@ class SCEVExpander : public SCEVVisitor<SCEVExpander, Value *> {
return false;
}
- /// This method returns the canonical induction variable of the specified
- /// type for the specified loop (inserting one if there is none). A
- /// canonical induction variable starts at zero and steps by one on each
- /// iteration.
- PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty);
-
/// Return the induction variable increment's IV operand.
Instruction *getIVIncOperand(Instruction *IncV, Instruction *InsertPos,
bool allowScale);
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index f58e2d927840..f3a8d75dc853 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -1986,28 +1986,6 @@ void SCEVExpander::rememberInstruction(Value *I) {
}
}
-/// getOrInsertCanonicalInductionVariable - This method returns the
-/// canonical induction variable of the specified type for the specified
-/// loop (inserting one if there is none). A canonical induction variable
-/// starts at zero and steps by one on each iteration.
-PHINode *
-SCEVExpander::getOrInsertCanonicalInductionVariable(const Loop *L,
- Type *Ty) {
- assert(Ty->isIntegerTy() && "Can only insert integer induction variables!");
-
- // Build a SCEV for {0,+,1}<L>.
- // Conservatively use FlagAnyWrap for now.
- const SCEV *H = SE.getAddRecExpr(SE.getConstant(Ty, 0),
- SE.getConstant(Ty, 1), L, SCEV::FlagAnyWrap);
-
- // Emit code for it.
- SCEVInsertPointGuard Guard(Builder, this);
- PHINode *V = cast<PHINode>(expandCodeForImpl(
- H, nullptr, &*L->getHeader()->getFirstInsertionPt(), false));
-
- return V;
-}
-
/// replaceCongruentIVs - Check for congruent phis in this loop header and
/// replace them with their most canonical representative. Return the number of
/// phis eliminated.
More information about the llvm-branch-commits
mailing list