LLVM: Enable OpenMP on aarch64 It just works™ Feel free to upstream the patch to LLVM (probably with `LINUX||FREEBSD` instead of removing the OS check completely though). PR: 248864 Differential_Revision: D21167 Reviewed_by: ??
Details
- Reviewers
val_packett.cool - Group Reviewers
arm64 Contributor Reviews (src)
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
contrib/openmp/runtime/src/kmp.h | ||
---|---|---|
3469 | Came in from "aarch64 port sent by C. Bergstrom" is there something FreeBSD-aarch64-specific here? |
contrib/openmp/runtime/src/kmp.h | ||
---|---|---|
3469 | The va_list usage in the else cases (which treats it as if it is already a pointer) does not compile on FreeBSD/aarch64, it needs to be in the same case as Linux/(aarch64|amd64|arm), which treats it as opaque. This is just another "upstream only considered Linux, we need to be included in the same way as Linux" case. |
This is just another "upstream only considered Linux, we need to be included in the same way as Linux" case.
But I mean this was already the case for the presumably-working amd64/i386 cases?
I'll have a look at this now. I was not aware of this review at all.
contrib/openmp/runtime/src/kmp.h | ||
---|---|---|
3469 | This would typically not be acceptable for upstream. The condition should at least be rewritten as: #if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && (KMP_OS_LINUX | KMP_OS_FREEBSD) It should probably be defining something like KMP_HAVE_WEIRD_VA_LIST so the conditional expression does not have to be changed in many places. |
I've submitted an upstream review here: https://reviews.llvm.org/D86397
With this and the src.opts.mk part, a buildworld for aarch64 completed successfully, although I have no way to determine whether the produced libomp.so works at all.