diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-08 20:38:54 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-08 20:38:54 +0000 |
commit | b81f47d19131bbc92192cf536d9f6da546cebab7 (patch) | |
tree | 4e2deb9e484f68b36bc2b096b9428155f9afbf23 /llvm/lib | |
parent | 2dc580c954cdfe73ee7d98fa61860c369058f1e8 (diff) | |
download | bcm5719-llvm-b81f47d19131bbc92192cf536d9f6da546cebab7.tar.gz bcm5719-llvm-b81f47d19131bbc92192cf536d9f6da546cebab7.zip |
Make the SCEV* form of getSCEVAtScope public, to allow ScalarEvolution
clients to use it.
llvm-svn: 71258
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index c43aad39875..8b48b78da41 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2721,9 +2721,16 @@ ComputeBackedgeTakenCountExhaustively(const Loop *L, Value *Cond, bool ExitWhen) return UnknownValue; } -/// getSCEVAtScope - Compute the value of the specified expression within the -/// indicated loop (which may be null to indicate in no loop). If the -/// expression cannot be evaluated, return UnknownValue. +/// getSCEVAtScope - Return a SCEV expression handle for the specified value +/// at the specified scope in the program. The L value specifies a loop +/// nest to evaluate the expression at, where null is the top-level or a +/// specified loop is immediately inside of the loop. +/// +/// This method can be used to compute the exit value for a variable defined +/// in a loop by querying what the value will hold in the parent loop. +/// +/// If this value is not computable at this scope, a SCEVCouldNotCompute +/// object is returned. SCEVHandle ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) { // FIXME: this should be turned into a virtual method on SCEV! @@ -2897,16 +2904,8 @@ SCEVHandle ScalarEvolution::getSCEVAtScope(const SCEV *V, const Loop *L) { assert(0 && "Unknown SCEV type!"); } -/// getSCEVAtScope - Return a SCEV expression handle for the specified value -/// at the specified scope in the program. The L value specifies a loop -/// nest to evaluate the expression at, where null is the top-level or a -/// specified loop is immediately inside of the loop. -/// -/// This method can be used to compute the exit value for a variable defined -/// in a loop by querying what the value will hold in the parent loop. -/// -/// If this value is not computable at this scope, a SCEVCouldNotCompute -/// object is returned. +/// getSCEVAtScope - This is a convenience function which does +/// getSCEVAtScope(getSCEV(V), L). SCEVHandle ScalarEvolution::getSCEVAtScope(Value *V, const Loop *L) { return getSCEVAtScope(getSCEV(V), L); } |