From: Dan Gohman Date: Mon, 16 Aug 2010 17:34:25 +0000 (+0000) Subject: Revert r111031. The way LLVM defines loop invariance, the property of an X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7d0e3c01f35fae3c448761c21477faa622872044;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111160 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index 4baaa4506c1..4213a287011 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -126,12 +126,6 @@ namespace llvm { 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 @@ namespace llvm { } 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 @@ namespace llvm { } 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: