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

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 06:31:42 PDT 2021


DavidSpickett 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,
----------------
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


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