[PATCH] D69930: [OpenMP] Introduce the OpenMPOpt transformation pass
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 07:54:45 PST 2020
lebedev.ri added a comment.
Some nits.
I think this should proceed, the intersection between "llvm developers"
and "openmp developers" appears to be only forming, and it can't possibly ever form
if the patches that form it are stuck waiting for the intersection to form :)
================
Comment at: llvm/include/llvm/Transforms/IPO/OpenMPOpt.h:31
+ operator bool() { return Value != NO_OPENMP_FOUND; }
+ enum { NO_OPENMP_FOUND, OPENMP_FOUND, UNKNOWN } Value = UNKNOWN;
+};
----------------
enum struct
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:841-843
+ // Try to perform OpenMP specific optimizations. This is a no-op if there are
+ // no OpenMP runtime calls present in the module.
+ MainCGPipeline.addPass(OpenMPOptPass());
----------------
Personally, i'd think this should only be run in `-O2` and higher (i.e. not under `-O0`/`-O1`)
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:144-145
+ bool deduplicateRuntimeCalls(Function &F, RuntimeFunctionInfo &RFI,
+ Value *ReplVal = nullptr) {
+ auto &Uses = RFI.UsesMap[&F];
+ if (Uses.size() + (ReplVal != nullptr) < 2)
----------------
Should there be a debug counter controlled early exit as the first line of function?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69930/new/
https://reviews.llvm.org/D69930
More information about the llvm-commits
mailing list