Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13738
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250317
91177308-0d34-0410-b5e6-
96231b3b80d8
LLVMContext &Context = loopHeader->getContext();
- // Probably we reach the quota of branches for this loop. If so
- // stop unswitching.
+ // Analyze loop cost, and stop unswitching if loop content can not be duplicated.
if (!BranchesInfo.countLoop(
currentLoop, getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
*currentLoop->getHeader()->getParent()),