[Openmp-commits] [PATCH] D147511: [OpenMP] Fix nextgen plugin thread_limit clause bug when passing negative values.

Michael Halkenhäuser via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 12 03:17:24 PDT 2023

mhalk added inline comments.

Comment at: openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:308
                                      ? ThreadLimitClause[0]
                                      : PreferredNumThreads);
jdoerfert wrote:
> I don't understand from the commit message what "the problem" was.
> This should be min(MNT, TLC[0] or PNT), no? This should never be negative, even if we interpret it signed later. Is the problem that we pick MNT and not PNT?
> Nit: We should check for <s0 with a cast and comparison, I think that makes the intend clearer.
Thank you for the feedback -- didn't want to obscure the problem or intent; I'll fix these.

> Is the problem that we pick MNT and not PNT?
Yes, AFAIK we expected to fallback / pick PNT in such a case.
Was that a wrong assumption?

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list