Page MenuHomeFreeBSD

LLVM: Enable OpenMP on aarch64
AbandonedPublic

Authored by dim on Aug 6 2019, 1:25 PM.
Tags
Referenced Files
Unknown Object (File)
Tue, Mar 26, 10:28 AM
Unknown Object (File)
Mar 10 2024, 8:41 PM
Unknown Object (File)
Feb 20 2024, 5:14 AM
Unknown Object (File)
Jan 15 2024, 3:43 AM
Unknown Object (File)
Jan 9 2024, 7:24 AM
Unknown Object (File)
Dec 20 2023, 6:46 AM
Unknown Object (File)
Nov 29 2023, 6:01 AM
Unknown Object (File)
Nov 27 2023, 11:41 PM

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.