[PATCH] D71948: [OpenMP] Use the OpenMPIRBuilder for `cancel` directives

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 04:18:34 PST 2019


JonChesterfield accepted this revision.
JonChesterfield added a comment.
This revision is now accepted and ready to land.

I like this, thanks. Very clear.



================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:241
+  // This seems to be used only once without much change of reuse, could live in
+  // OMPKinds.def but seems not necessary.
+  Value *CancelKind = nullptr;
----------------
The integer numbers correspond to the `kmp_cancel_kind_t` enum in `runtime/src/kmp.h`. The target offloading presently ignores this argument, but the host version has a control flow dependency on it.

I think the enum should be shared between the compiler and the runtime, or failing that, some test code should include kmp.h and check the numbers still match.

This feels like a familiar point - I've just sent an email to openmp-dev to discuss whether we can share constants between the two without copy & paste.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71948





More information about the llvm-commits mailing list