[PATCH] D69930: [OpenMP] Introduce the OpenMPOpt transformation pass
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 10:20:59 PST 2020
jdoerfert added a comment.
In D69930#1900147 <https://reviews.llvm.org/D69930#1900147>, @xiaoqing_wu wrote:
> This line needs to be guarded with #if !defined(NDEBUG) to prevent warning-as-error failures in release build.
>
> static constexpr auto TAG = "[" DEBUG_TYPE "]";
>
>
> The change made in https://reviews.llvm.org/rGa50c0b0df733423f9f6f92bb4e0be26f73326ae3 is not sufficient to prevent release build issue. Could you fix this? Thanks!
I don't understand why this is not sufficient. Could you explain that please? (I usually test with release+asserts)
================
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());
----------------
lebedev.ri wrote:
> Personally, i'd think this should only be run in `-O2` and higher (i.e. not under `-O0`/`-O1`)
I can do that.
================
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)
----------------
lebedev.ri wrote:
> Should there be a debug counter controlled early exit as the first line of function?
I don't understand what you want here, could you explain?
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