aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-01 17:08:34 +0000
committerDan Gohman <gohman@apple.com>2009-05-01 17:08:34 +0000
commitb52e1c587f166c6fb8b9abeaaeaee3bda944091b (patch)
treeced53b2549055d8e7c5d42dbd744fa78979898b3
parent9f2d671b154e2b48b097d813b64a2bf2a33c547a (diff)
Add an accessor method to allow clients to test if a given expression
is associated with a SCEV expansion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70556 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index 6290c40123..bb3183dafa 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -53,6 +53,12 @@ namespace llvm {
return InsertedValues.count(I);
}
+ /// isInsertedExpression - Return true if the the code rewriter has a
+ /// Value* recorded for the given expression.
+ bool isInsertedExpression(const SCEV *S) const {
+ return InsertedExpressions.count(S);
+ }
+
/// getOrInsertCanonicalInductionVariable - This method returns the
/// canonical induction variable of the specified type for the specified
/// loop (inserting one if there is none). A canonical induction variable