Remove distasteful method which is really part of the indvars pass
authorChris Lattner <sabre@nondot.org>
Thu, 24 Jun 2004 06:52:20 +0000 (06:52 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 24 Jun 2004 06:52:20 +0000 (06:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14359 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp

index f3ef0e551d48941a6203eb50773a15d4f622df88..d72405d24da4143e2e0117fa6bb3e5769cfef057 100644 (file)
@@ -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;
index 5701dec4b21ec85b72dc500733d70f3d8b05e579..257fc0d7fe061dd567618cc21103dfa7ecfb4ab7 100644 (file)
@@ -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<SCEVAddRecExpr>(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