diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp --- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp @@ -2668,9 +2668,9 @@ 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 @@ 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 @@ 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);