[Openmp-commits] [PATCH] D106033: [OpenMP] Folding threadLimit and numThreads when single value in kernels
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 22 21:48:00 PDT 2021
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:1777-1778
+ /// Populate the Attributor with abstract attribute opportunities in the
+ /// function.
+ void registerFoldRuntimeCall(RuntimeFunction RF);
----------------
copy and paste.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3663
+ *this, IRPosition::function(*getAnchorScope()), DepClassTy::REQUIRED);
+
+ // What actual kernels reach this function
----------------
```
if (!CallerKernelInfoAA.ReachingKernelEntries.isValid())
return indicatePessimisticFixpoint();
```
also below
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3674
+ }
+ return indicatePessimisticFixpoint();
+ }
----------------
use early exit instead,
if (!...)
return ...
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3683
+ }
+ return indicatePessimisticFixpoint();
+ }
----------------
no reaching kernels is fine, keep it at none (which is the default) and just return UNCHANGED.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3684
+ return indicatePessimisticFixpoint();
+ }
+
----------------
make this function take the string attribute such that we can have a single one and not two.
================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:3736
+ CallInst *CI = OpenMPOpt::getCallIfRegularCall(U, &RFI);
+ //errs() << IRPosition::callsite_function(*CI).getPositionKind() << " -- " << RF;
+ if (!CI)
----------------
leftover. (and you can also just pipe an IRPosition into errs())
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106033/new/
https://reviews.llvm.org/D106033
More information about the Openmp-commits
mailing list