diff options
Diffstat (limited to 'llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp')
| -rw-r--r-- | llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp b/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp index 30eec5a611f7..031bf3bae51d 100644 --- a/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp +++ b/llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp @@ -339,7 +339,8 @@ bool LegacyDivergenceAnalysis::runOnFunction(Function &F) { if (shouldUseGPUDivergenceAnalysis(F, TTI)) { // run the new GPU divergence analysis auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); - gpuDA = std::make_unique<GPUDivergenceAnalysis>(F, DT, PDT, LI, TTI); + gpuDA = std::make_unique<DivergenceInfo>(F, DT, PDT, LI, TTI, + /* KnownReducible = */ true); } else { // run LLVM's existing DivergenceAnalysis @@ -396,8 +397,7 @@ void LegacyDivergenceAnalysis::print(raw_ostream &OS, const Module *) const { OS << Arg << "\n"; } // Iterate instructions using instructions() to ensure a deterministic order. - for (auto BI = F->begin(), BE = F->end(); BI != BE; ++BI) { - auto &BB = *BI; + for (const BasicBlock &BB : *F) { OS << "\n " << BB.getName() << ":\n"; for (auto &I : BB.instructionsWithoutDebug()) { OS << (isDivergent(&I) ? "DIVERGENT: " : " "); |
