Enable OpenMP for powerpcle to match the rest of powerpc*.
Update tests.
Paths
| Differential D92445
[PowerPC] Enable OpenMP for powerpcle target. [5/5] ClosedPublic Authored by Bdragon28 on Dec 1 2020, 6:45 PM.
Details
Summary Enable OpenMP for powerpcle to match the rest of powerpc*. Update tests.
Diff Detail
Event TimelineHerald added subscribers: llvm-commits, cfe-commits, dexonsmith and 9 others. · View Herald Transcript Comment Actions On FreeBSD, the main use of this will be on the new powerpc64le arch, where we need to build a 32-bit LE bootloader for use with pseries. (it is easier to retarget LLVM than make a cross-endian bootloader, as it would involve rewriting filesystem code etc.) On Linux, I suspect the primary use will be with user-space CPU emulation tools that do syscall translation from foreign LE architectures. On Linux, I set the defaults assuming that this target would primarily be used as a multiarch instead of the "native" arch for an install (i.e. assume lib32 instead of lib). If there are any existing powerpcle userlands out there that do not do this, it can be changed. Note: I do not have commit access yet. Comment Actions This seems problematic to me for a few reasons:
Since this seems to be for a very specific use case, can we perhaps severely restrict the support for 32-bit little endian mode (perhaps BSD only, no Altivec/VSX, etc.)? Comment Actions This patch should be split. I suggest that you create 4 patches.
Comment Actions
Technically, 32 bit PowerPC systems are neither ELFv1 nor ELFv2, they are Power Architecture 32-bit ABI (which has various extensions) that does not have the complexities that plagued ELFv1 and is a relatively "normal" ABI. I have not seen any places that this is problematic that I am not already addressing with this patch. Comment Actions
Can do. Comment Actions
I would be fine with restricting this to FreeBSD and/or limiting it to freestanding. I mainly added the Linux support as there was recent interest in 32-bit LE and it is a possibility there will be some experimental userlands at some point in the future. https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-May/211669.html Comment Actions Regarding things like Altivec and VSX: Regarding codegen: Regarding Book-III support for powerpcle: Regarding cpu support for powerpcle: Regarding hosted use: Comment Actions
Excuse my ignorance, but what are there technical limitations preventing writing n 64-bit LE boot loader and avoid having a 32-bit LE target all-together? Comment Actions Could you add some more information to the commit message to better describe the powerpcle target. It's not clear from the target name exactly what it is for. Comment Actions
LoPAPR client binding requirements, section B.10. FreeBSD loader on pseries is an OF client, and as such, while it is free to be either BE or LE (OF is required to adapt itself), it MUST be a 32-bit image. Comment Actions I am interested in this, since we are currently bootstrapping an entire ppcle userland in our distribution (glibc and musl) - we already have everything generally working (on ppc64le host), with llvm being a notable blocker for some things - so i will be testing this in near future Comment Actions we are also interested in running this on "true" 32-bit hardware eventually, so not restricting to POWER7 would be a good thing, potentially Comment Actions I've tested the patch (applied to LLVM11) and can confirm it works. There have been some changes/fixes I needed to do, which I already reported on IRC, so I will not include them here (Bdragon28 should just be able to apply them and push them out) Right now, I have a full ppcle Linux userland (which can fully compile itself, so it's self-hosted), I will be making binary packages available soon (source is already available through the Void Linux project) so anyone with a ppc64le kernel with a couple of fixes (also available through Void) should be able to run a full 32-bit LE environment Comment Actions
Comment Actions
Bdragon28 retitled this revision from [PowerPC] Add powerpcle target. to [PowerPC] Add powerpcle target. (5/5). Bdragon28 removed a child revision: D93918: [PowerPC] Add the LLVM triple for powerpcle [1/5].Dec 29 2020, 1:58 PM This revision is now accepted and ready to land.Dec 29 2020, 7:27 PM Bdragon28 retitled this revision from [PowerPC] Add powerpcle target. (5/5) to [PowerPC] Enable OpenMP for powerpcle target. [5/5].Jan 2 2021, 9:00 AM Closed by commit rG2288319733cd: [PowerPC] Enable OpenMP for powerpcle target. [5/5] (authored by Bdragon28). · Explain WhyJan 2 2021, 10:20 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 313651 clang/lib/Basic/Targets.cpp
clang/lib/Basic/Targets/OSTargets.h
clang/lib/Basic/Targets/PPC.h
clang/lib/Basic/Targets/PPC.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/TargetInfo.cpp
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/FreeBSD.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/Linux.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/altivec.c
clang/test/CodeGen/builtins-ppc-altivec.c
clang/test/CodeGen/ppc32-and-aix-struct-return.c
clang/test/CodeGen/target-data.c
clang/test/Driver/ppc-endian.c
lld/ELF/Driver.cpp
lld/ELF/InputFiles.cpp
lld/ELF/ScriptParser.cpp
lld/test/ELF/emulation-ppc.s
lld/test/ELF/ppc32-gnu-ifunc.s
lld/test/ELF/ppc32-reloc-rel.s
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/include/llvm/Object/ELFObjectFile.h
llvm/lib/Frontend/OpenMP/OMPContext.cpp
llvm/lib/Object/RelocationResolver.cpp
llvm/test/tools/llvm-objcopy/ELF/binary-output-target.test
llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
llvm/test/tools/llvm-objdump/ELF/PowerPC/branch-offset.s
|
clang-format not found in user's PATH; not linting file.