diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index f3ef0e551d48..d72405d24da4 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -199,12 +199,6 @@ namespace llvm { /// that no dangling references are left around. void deleteInstructionFromRecords(Instruction *I) const; - /// shouldSubstituteIndVar - Return true if we should perform induction - /// variable substitution for this variable. This is a hack because we - /// don't have a strength reduction pass yet. When we do we will promote - /// all vars, because we can strength reduce them later as desired. - bool shouldSubstituteIndVar(const SCEV *S) const; - virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 5701dec4b21e..257fc0d7fe06 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2177,19 +2177,6 @@ void ScalarEvolution::deleteInstructionFromRecords(Instruction *I) const { return ((ScalarEvolutionsImpl*)Impl)->deleteInstructionFromRecords(I); } - -/// shouldSubstituteIndVar - Return true if we should perform induction variable -/// substitution for this variable. This is a hack because we don't have a -/// strength reduction pass yet. When we do we will promote all vars, because -/// we can strength reduce them later as desired. -bool ScalarEvolution::shouldSubstituteIndVar(const SCEV *S) const { - // Don't substitute high degree polynomials. - if (const SCEVAddRecExpr *AddRec = dyn_cast(S)) - if (AddRec->getNumOperands() > 3) return false; - return true; -} - - static void PrintLoopInfo(std::ostream &OS, const ScalarEvolution *SE, const Loop *L) { // Print all inner loops first