[PATCH] D141010: OpenMPOpt: Check nested parallelism in target region

Jose Manuel Monsalve Diaz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 7 07:11:00 PST 2023


josemonsalve2 added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:4364
+            *this, IRPosition::function(*ParallelRegion), DepClassTy::OPTIONAL);
+        if (!FnAA.ReachedKnownParallelRegions.empty() ||
+            !FnAA.ReachedUnknownParallelRegions.empty())
----------------
jdoerfert wrote:
> josemonsalve2 wrote:
> > 
> > ```
> > NestedParallelism = !FnAA.ReachedKnownParallelRegions.empty() || !FnAA.ReachedUnknownParallelRegions.empty()
> > ```
> If you change it, then `|=`, the current way is OK too.
> 
> One thing to add though: `!FnAA.getState().isValidState() || ...`
Rafa. I believe this comment by johannes has not been solved. The the if statement before the assignment. It can also be added to this line. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141010/new/

https://reviews.llvm.org/D141010



More information about the llvm-commits mailing list