Page MenuHomeFreeBSD

LLVM: Enable OpenMP on aarch64
AbandonedPublic

Authored by dim on Aug 6 2019, 1:25 PM.
Tags
Referenced Files
F103389733: D21167.id60501.diff
Sun, Nov 24, 9:46 AM
Unknown Object (File)
Sun, Nov 24, 1:20 AM
Unknown Object (File)
Fri, Nov 22, 10:43 PM
Unknown Object (File)
Fri, Nov 22, 5:42 PM
Unknown Object (File)
Tue, Nov 19, 8:43 PM
Unknown Object (File)
Tue, Nov 19, 2:45 PM
Unknown Object (File)
Sun, Nov 17, 3:00 AM
Unknown Object (File)
Sun, Nov 17, 2:58 AM

Details

Summary
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: ??

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"
http://llvm.org/viewvc/llvm-project?view=revision&revision=225792
but this just added KMP_AARCH_64 to the existing ARM/X86_64 cases, KMP_OS_LINUX was already there

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?

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?

FreeBSD/amd64 works anyway because va_list *is* a pointer there

Rebased on top of the powerpc64 change

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.

koobs retitled this revision from base llvm: Enable OpenMP on aarch64 to LLVM: Enable OpenMP on aarch64.Aug 24 2020, 2:41 AM
koobs edited the summary of this revision. (Show Details)
dim abandoned this revision.
dim added a reviewer: val_packett.cool.

Thanks for this review, it's now effectively enabled via rS364732 for the change that went into upstream, and rS364733 to change src.opts.mk.