From daa3a9f38cd715b76a8eb832ca73c46bbb9f709c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 1 May 2009 17:08:34 +0000 Subject: [PATCH] Add an accessor method to allow clients to test if a given expression is associated with a SCEV expansion. llvm-svn: 70556 --- include/llvm/Analysis/ScalarEvolutionExpander.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 6290c401234..bb3183dafa5 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