From cb274415544470a5e655bc4cb823323fa43b844f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 11 Feb 2014 15:44:32 +0000 Subject: 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 --- include/llvm/Analysis/ScalarEvolution.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/llvm/Analysis/ScalarEvolution.h') 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. -- cgit v1.2.3