summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-02-11 15:44:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-02-11 15:44:32 +0000
commitcb274415544470a5e655bc4cb823323fa43b844f (patch)
tree46d20ed07807b116e736fd6b41f00e0db0e2eeff /include
parenta63585a8f5fab55a4cd412eec632a98392b640ea (diff)
downloadllvm-cb274415544470a5e655bc4cb823323fa43b844f.tar.gz
llvm-cb274415544470a5e655bc4cb823323fa43b844f.tar.bz2
llvm-cb274415544470a5e655bc4cb823323fa43b844f.tar.xz
ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 80809da81a..36119acf40 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -469,6 +469,13 @@ namespace llvm {
BasicBlock *FBB,
bool IsSubExpr);
+ /// ComputeExitLimitFromSingleExitSwitch - Compute the number of times the
+ /// backedge of the specified loop will execute if its exit condition were a
+ /// switch with a single exiting case to ExitingBB.
+ ExitLimit
+ ComputeExitLimitFromSingleExitSwitch(const Loop *L, SwitchInst *Switch,
+ BasicBlock *ExitingBB, bool IsSubExpr);
+
/// ComputeLoadConstantCompareExitLimit - Given an exit condition
/// of 'icmp op load X, cst', try to see if we can compute the
/// backedge-taken count.