[Openmp-commits] [PATCH] D102307: [OpenMP] Detect SPMD compatible kernels and execute them as such
Carlo Bertolli via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 6 09:13:20 PDT 2021
carlo.bertolli accepted this revision.
carlo.bertolli added a comment.
This revision is now accepted and ready to land.
I have very small comments. LGTM.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2764
+ // we need to register a simplification callback so that the Attributor
// knows the constant arguments to ___kmpc_target_init and
// __kmpc_target_deinit might actually change.
----------------
is it two of three underscore's? Elsewhere, it has three between OMPRTL and the fun name.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2857
+ ORA << ", consider to add "
+ "`__attribute__((assume(\"omp_spmd_amenable\"))`"
+ " to the called function '"
----------------
If this is an optimization remark, you might want to use "noomp" or other equivalent OpenMP standard name. omp_spmd_amenable is clang only (not openmp spec's defined) and might create a compiler specific slang.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2874
+ GlobalVariable *ExecMode = Kernel->getParent()->getGlobalVariable(
+ (Kernel->getName() + "_exec_mode").str());
+ assert(ExecMode && "Kernel without exec mode?");
----------------
It'd be nice to use something like "OMPInformationCache" to store "_exec_mode" instead of a magic string here...so if anybody changes clang, we can capture it here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102307/new/
https://reviews.llvm.org/D102307
More information about the Openmp-commits
mailing list