Author: Whitney Tsang Date: 2021-01-05T18:44:43Z New Revision: 601636de98061b53242b598fc2354905c8efbfb8
URL: https://github.com/llvm/llvm-project/commit/601636de98061b53242b598fc2354905c8efbfb8 DIFF: https://github.com/llvm/llvm-project/commit/601636de98061b53242b598fc2354905c8efbfb8.diff LOG: [LoopNest] Allow empty basic blocks without loops Addressed Florian's post commit review comments: 1. included STLExtras.h 2. changed std::all_of to llvm::all_of Differential Revision: https://reviews.llvm.org/D93665 Added: Modified: llvm/include/llvm/Analysis/LoopNestAnalysis.h Removed: ################################################################################ diff --git a/llvm/include/llvm/Analysis/LoopNestAnalysis.h b/llvm/include/llvm/Analysis/LoopNestAnalysis.h index f65ff493574c4..9c4fb4dbc29b4 100644 --- a/llvm/include/llvm/Analysis/LoopNestAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopNestAnalysis.h @@ -14,6 +14,7 @@ #ifndef LLVM_ANALYSIS_LOOPNESTANALYSIS_H #define LLVM_ANALYSIS_LOOPNESTANALYSIS_H +#include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/LoopInfo.h" @@ -130,14 +131,12 @@ class LoopNest { /// Return true if all loops in the loop nest are in simplify form. bool areAllLoopsSimplifyForm() const { - return llvm::all_of(Loops, - [](const Loop *L) { return L->isLoopSimplifyForm(); }); + return all_of(Loops, [](const Loop *L) { return L->isLoopSimplifyForm(); }); } /// Return true if all loops in the loop nest are in rotated form. bool areAllLoopsRotatedForm() const { - return std::all_of(Loops.begin(), Loops.end(), - [](const Loop *L) { return L->isRotatedForm(); }); + return all_of(Loops, [](const Loop *L) { return L->isRotatedForm(); }); } StringRef getName() const { return Loops.front()->getName(); } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits