[llvm-commits] [llvm] r111160 - /llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h

Dan Gohman gohman at apple.com
Mon Aug 16 10:34:25 PDT 2010


Author: djg
Date: Mon Aug 16 12:34:25 2010
New Revision: 111160

URL: http://llvm.org/viewvc/llvm-project?rev=111160&view=rev
Log:
Revert r111031. The way LLVM defines loop invariance, the property of an
expression being loop invariant is not equivalent to the property of
properly dominating the loop header.

Other optimizations have also made this optimization less important.

Modified:
    llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=111160&r1=111159&r2=111160&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Mon Aug 16 12:34:25 2010
@@ -126,12 +126,6 @@
   public:
     virtual void print(raw_ostream &OS) const;
 
-    virtual bool hasComputableLoopEvolution(const Loop *QL) const {
-      // Not computable. A truncate of an addrec is always folded into
-      // the addrec.
-      return false;
-    }
-
     /// Methods for support type inquiry through isa, cast, and dyn_cast:
     static inline bool classof(const SCEVTruncateExpr *S) { return true; }
     static inline bool classof(const SCEV *S) {
@@ -281,12 +275,6 @@
     }
 
   public:
-    virtual bool hasComputableLoopEvolution(const Loop *QL) const {
-      // Not computable. An add of an addrec is always folded into the addrec
-      // if the other operands are loop-variant or loop-computable.
-      return false;
-    }
-
     virtual const char *getOperationStr() const { return " + "; }
 
     virtual const Type *getType() const {
@@ -315,12 +303,6 @@
     }
 
   public:
-    virtual bool hasComputableLoopEvolution(const Loop *QL) const {
-      // Not computable. A mul of an addrec is always folded into the addrec
-      // if the other operands are loop-variant or loop-computable.
-      return false;
-    }
-
     virtual const char *getOperationStr() const { return " * "; }
 
     /// Methods for support type inquiry through isa, cast, and dyn_cast:





More information about the llvm-commits mailing list