summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index e679b7ad7b8..67a82b192e5 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -200,6 +200,15 @@ bool Loop::isLCSSAForm(DominatorTree &DT) const {
return true;
}
+bool Loop::isRecursivelyLCSSAForm(DominatorTree &DT) const {
+ if (!isLCSSAForm(DT))
+ return false;
+
+ return std::all_of(begin(), end(), [&](const Loop *L) {
+ return L->isRecursivelyLCSSAForm(DT);
+ });
+}
+
/// isLoopSimplifyForm - Return true if the Loop is in the form that
/// the LoopSimplify form transforms loops to, which is sometimes called
/// normal form.
OpenPOWER on IntegriCloud