diff options
author | Adam Nemet <anemet@apple.com> | 2016-09-29 17:25:00 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-09-29 17:25:00 +0000 |
commit | eb0ba8d50f42ebb9d2e4bb992872a761894efeee (patch) | |
tree | 62c86a41f860f911c7a867cd116b61dd31dc9a7c | |
parent | 0bfa441701d846e778dd4479468ee80943cc7e0c (diff) | |
download | bcm5719-llvm-eb0ba8d50f42ebb9d2e4bb992872a761894efeee.tar.gz bcm5719-llvm-eb0ba8d50f42ebb9d2e4bb992872a761894efeee.zip |
[LV] Move static createMissedAnalysis from anonymous to global namespace
This is an attempt to fix a windows bot.
llvm-svn: 282730
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 0e53de2b2d5..ec833001a45 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -213,32 +213,6 @@ static cl::opt<unsigned> 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<Loop, LoopBodyTraits>::begin(L), - scc_iterator<Loop, LoopBodyTraits>::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<Loop, LoopBodyTraits>::begin(L), + scc_iterator<Loop, LoopBodyTraits>::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 { |