[PATCH] D104920: [OpenMP] Increase attributor iterations on the GPU

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 06:48:30 PDT 2021


jhuber6 added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2671
 
-  unsigned MaxFixponitIterations = (Kernels.empty()) ? 64 : 32;
-  Attributor A(Functions, InfoCache, CGUpdater, nullptr, true, false, MaxFixponitIterations, OREGetter,
-               DEBUG_TYPE);
+  unsigned MaxFixponitIterations = (isOpenMPDevice) ? 128 : 32;
+  Attributor A(Functions, InfoCache, CGUpdater, nullptr, true, false,
----------------
DavidSpickett wrote:
> Building with GCC I get a warning here:
> ```
> llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2671:37: warning: address of function 'isOpenMPDevice' will always evaluate to 'true' [-Wpointer-bool-conversion]
>   unsigned MaxFixponitIterations = (isOpenMPDevice) ? 128 : 32;
>                                     ^~~~~~~~~~~~~~  ~
> /home/david.spickett/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2671:37: note: prefix with the address-of operator to silence this warning
>   unsigned MaxFixponitIterations = (isOpenMPDevice) ? 128 : 32;
>                                     ^
>                                     &
> ```
> 
> Also going by the patch before this it should be `MaxFixpointIterations`. ponit -> point
Should be fixed upstream, thanks for pointing out the typo.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104920



More information about the llvm-commits mailing list