[llvm] 4a6bd8e - [OpenMP] Increase attributor iterations on the GPU
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 28 05:50:59 PDT 2021
Author: Joseph Huber
Date: 2021-06-28T08:50:49-04:00
New Revision: 4a6bd8e3e76d60c44fef70ed03f661b0c73fb5c7
URL: https://github.com/llvm/llvm-project/commit/4a6bd8e3e76d60c44fef70ed03f661b0c73fb5c7
DIFF: https://github.com/llvm/llvm-project/commit/4a6bd8e3e76d60c44fef70ed03f661b0c73fb5c7.diff
LOG: [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
Added:
Modified:
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index 32db92ee86463..2410e52848cb0 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -2668,9 +2668,9 @@ PreservedAnalyses OpenMPOptPass::run(Module &M, ModuleAnalysisManager &AM) {
SetVector<Function *> 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);
More information about the llvm-commits
mailing list