diff options
author | Dan Gohman <gohman@apple.com> | 2009-06-27 21:21:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-06-27 21:21:31 +0000 |
commit | c6475cbe49a1f956e001a7cc5b695a92f6603aee (patch) | |
tree | dcadaf64494bd9aa15f59d44f623335024b5b16a /include/llvm/Analysis/ScalarEvolutionExpressions.h | |
parent | 58e3d6c902c109447160c76c1e201800505cf7e6 (diff) | |
download | external_llvm-c6475cbe49a1f956e001a7cc5b695a92f6603aee.zip external_llvm-c6475cbe49a1f956e001a7cc5b695a92f6603aee.tar.gz external_llvm-c6475cbe49a1f956e001a7cc5b695a92f6603aee.tar.bz2 |
Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
of a team of individual allocations and a team of std::maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpressions.h')
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpressions.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index 8be1a93..c54c865 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -39,6 +39,8 @@ namespace llvm { explicit SCEVConstant(ConstantInt *v) : SCEV(scConstant), V(v) {} public: + virtual void Profile(FoldingSetNodeID &ID) const; + ConstantInt *getValue() const { return V; } virtual bool isLoopInvariant(const Loop *L) const { @@ -81,6 +83,8 @@ namespace llvm { SCEVCastExpr(unsigned SCEVTy, const SCEV* op, const Type *ty); public: + virtual void Profile(FoldingSetNodeID &ID) const; + const SCEV* getOperand() const { return Op; } virtual const Type *getType() const { return Ty; } @@ -200,6 +204,8 @@ namespace llvm { : SCEV(T), Operands(ops.begin(), ops.end()) {} public: + virtual void Profile(FoldingSetNodeID &ID) const; + unsigned getNumOperands() const { return (unsigned)Operands.size(); } const SCEV* getOperand(unsigned i) const { assert(i < Operands.size() && "Operand index out of range!"); @@ -330,6 +336,8 @@ namespace llvm { : SCEV(scUDivExpr), LHS(lhs), RHS(rhs) {} public: + virtual void Profile(FoldingSetNodeID &ID) const; + const SCEV* getLHS() const { return LHS; } const SCEV* getRHS() const { return RHS; } @@ -389,6 +397,8 @@ namespace llvm { } public: + virtual void Profile(FoldingSetNodeID &ID) const; + const SCEV* getStart() const { return Operands[0]; } const Loop *getLoop() const { return L; } @@ -505,6 +515,8 @@ namespace llvm { SCEV(scUnknown), V(v) {} public: + virtual void Profile(FoldingSetNodeID &ID) const; + Value *getValue() const { return V; } virtual bool isLoopInvariant(const Loop *L) const; |