From 877292e5c50ded2a194923a125881a1a717f6804 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 25 Jun 2021 10:42:00 -0400 Subject: [PATCH] [OpenMP] Increase attributor iterations on the GPU Increase the number of attributor iterations on a GPU target. I forgot to change this in D104416. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D104920 --- lib/Transforms/IPO/OpenMPOpt.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Transforms/IPO/OpenMPOpt.cpp b/lib/Transforms/IPO/OpenMPOpt.cpp index 32db92ee864..2410e52848c 100644 --- a/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/lib/Transforms/IPO/OpenMPOpt.cpp @@ -2668,9 +2668,9 @@ PreservedAnalyses OpenMPOptPass::run(Module &M, ModuleAnalysisManager &AM) { SetVector Functions(SCC.begin(), SCC.end()); OMPInformationCache InfoCache(M, AG, Allocator, /*CGSCC*/ Functions, Kernels); - unsigned MaxFixponitIterations = (Kernels.empty()) ? 64 : 32; - Attributor A(Functions, InfoCache, CGUpdater, nullptr, true, false, MaxFixponitIterations, OREGetter, - DEBUG_TYPE); + unsigned MaxFixponitIterations = (isOpenMPDevice) ? 128 : 32; + Attributor A(Functions, InfoCache, CGUpdater, nullptr, true, false, + MaxFixponitIterations, OREGetter, DEBUG_TYPE); OpenMPOpt OMPOpt(SCC, CGUpdater, OREGetter, InfoCache, A); bool Changed = OMPOpt.run(true); @@ -2720,9 +2720,9 @@ PreservedAnalyses OpenMPOptCGSCCPass::run(LazyCallGraph::SCC &C, OMPInformationCache InfoCache(*(Functions.back()->getParent()), AG, Allocator, /*CGSCC*/ Functions, Kernels); - unsigned MaxFixponitIterations = (isOpenMPDevice(M)) ? 64 : 32; - Attributor A(Functions, InfoCache, CGUpdater, nullptr, false, true, MaxFixponitIterations, OREGetter, - DEBUG_TYPE); + unsigned MaxFixponitIterations = (isOpenMPDevice(M)) ? 128 : 32; + Attributor A(Functions, InfoCache, CGUpdater, nullptr, false, true, + MaxFixponitIterations, OREGetter, DEBUG_TYPE); OpenMPOpt OMPOpt(SCC, CGUpdater, OREGetter, InfoCache, A); bool Changed = OMPOpt.run(false); @@ -2786,7 +2786,7 @@ struct OpenMPOptCGSCCLegacyPass : public CallGraphSCCPass { Allocator, /*CGSCC*/ Functions, Kernels); - unsigned MaxFixponitIterations = (isOpenMPDevice(M)) ? 64 : 32; + unsigned MaxFixponitIterations = (isOpenMPDevice(M)) ? 128 : 32; Attributor A(Functions, InfoCache, CGUpdater, nullptr, false, true, MaxFixponitIterations, OREGetter, DEBUG_TYPE);