An omp cancel parallel needs to be emitted by the OpenMPIRBuilder if
the parallel was emitted by the OpenMPIRBuilder. This patch makes
this possible. The cancel logic is shared with the cancel barriers.
Testing is done via unit tests and the clang cancel_codegen.cpp file
once D70290 lands.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Unit tests: fail. 61126 tests passed, 1 failed and 728 were skipped.
failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_class/try_lock.pass.cpp
clang-tidy: fail. Please fix clang-tidy findings.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
I like this, thanks. Very clear.
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | ||
---|---|---|
241 | 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. |
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | ||
---|---|---|
241 | I move them into OMPKinds.def, we can share them from there. I'll respond to the mailing list. |
clang-tidy: warning: invalid case style for function 'CreateCancel' [readability-identifier-naming]
clang-format: please reformat the code