From eb0ba8d50f42ebb9d2e4bb992872a761894efeee Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 29 Sep 2016 17:25:00 +0000 Subject: [PATCH] [LV] Move static createMissedAnalysis from anonymous to global namespace This is an attempt to fix a windows bot. llvm-svn: 282730 --- .../Transforms/Vectorize/LoopVectorize.cpp | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 0e53de2b2d55..ec833001a45c 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -213,32 +213,6 @@ static cl::opt PragmaVectorizeSCEVCheckThreshold( cl::desc("The maximum number of SCEV checks allowed with a " "vectorize(enable) pragma")); -namespace { - -// Forward declarations. -class LoopVectorizeHints; -class LoopVectorizationLegality; -class LoopVectorizationCostModel; -class LoopVectorizationRequirements; - -/// Returns true if the given loop body has a cycle, excluding the loop -/// itself. -static bool hasCyclesInLoopBody(const Loop &L) { - if (!L.empty()) - return true; - - for (const auto &SCC : - make_range(scc_iterator::begin(L), - scc_iterator::end(L))) { - if (SCC.size() > 1) { - DEBUG(dbgs() << "LVL: Detected a cycle in the loop body:\n"); - DEBUG(L.dump()); - return true; - } - } - return false; -} - /// Create an analysis remark that explains why vectorization failed /// /// \p PassName is the name of the pass (e.g. can be AlwaysPrint). \p @@ -265,6 +239,32 @@ createMissedAnalysis(const char *PassName, StringRef RemarkName, Loop *TheLoop, return R; } +namespace { + +// Forward declarations. +class LoopVectorizeHints; +class LoopVectorizationLegality; +class LoopVectorizationCostModel; +class LoopVectorizationRequirements; + +/// Returns true if the given loop body has a cycle, excluding the loop +/// itself. +static bool hasCyclesInLoopBody(const Loop &L) { + if (!L.empty()) + return true; + + for (const auto &SCC : + make_range(scc_iterator::begin(L), + scc_iterator::end(L))) { + if (SCC.size() > 1) { + DEBUG(dbgs() << "LVL: Detected a cycle in the loop body:\n"); + DEBUG(L.dump()); + return true; + } + } + return false; +} + /// \brief This modifies LoopAccessReport to initialize message with /// loop-vectorizer-specific part. class VectorizationReport : public LoopAccessReport { -- 2.34.1