Add the AArch64 llvm backend to the build to allow for early testing and

to ease any rework of how clang is built to take arm64 in to account.

Submitted by:	andrew
Reviewed by:	andrew, emaste
Differential Revision: https://reviews.freebsd.org/D1446
This commit is contained in:
Dimitry Andric 2015-01-07 19:06:27 +00:00
parent 12940e3dc3
commit 47a80b9264
34 changed files with 292 additions and 46 deletions

View File

@ -56,6 +56,13 @@ SUBDIR= libclanganalysis \
libllvmtransformutils \
libllvmvectorize \
\
libllvmaarch64asmparser \
libllvmaarch64codegen \
libllvmaarch64desc \
libllvmaarch64disassembler \
libllvmaarch64info \
libllvmaarch64instprinter \
libllvmaarch64utils \
libllvmarmasmparser \
libllvmarmcodegen \
libllvmarmdesc \

View File

@ -29,8 +29,8 @@ TARGET_ABI= gnueabi
TARGET_ABI= unknown
.endif
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0
BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0
BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-unknown-freebsd11.0
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \
-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
@ -46,7 +46,7 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td
-I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \
${LLVM_SRCS}/include/llvm/IR/Intrinsics.td
.for arch in \
ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86
AArch64/AArch64 ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86
. for hdr in \
AsmMatcher/-gen-asm-matcher \
AsmWriter1/-gen-asm-writer,-asmwriternum=1 \

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenAsmMatcher.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenAsmWriter.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenAsmWriter1.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenCallingConv.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenDAGISel.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenDisassemblerTables.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenFastISel.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenInstrInfo.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenMCCodeEmitter.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenMCPseudoLowering.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenRegisterInfo.inc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "AArch64GenSubtargetInfo.inc.h"

View File

@ -1,5 +1,6 @@
/* $FreeBSD$ */
LLVM_ASM_PARSER(AArch64)
LLVM_ASM_PARSER(ARM)
LLVM_ASM_PARSER(Mips)
LLVM_ASM_PARSER(PowerPC)

View File

@ -1,5 +1,6 @@
/* $FreeBSD$ */
LLVM_ASM_PRINTER(AArch64)
LLVM_ASM_PRINTER(ARM)
LLVM_ASM_PRINTER(Mips)
LLVM_ASM_PRINTER(PowerPC)

View File

@ -1,5 +1,6 @@
/* $FreeBSD$ */
LLVM_DISASSEMBLER(AArch64)
LLVM_DISASSEMBLER(ARM)
LLVM_DISASSEMBLER(Mips)
LLVM_DISASSEMBLER(PowerPC)

View File

@ -1,5 +1,6 @@
/* $FreeBSD$ */
LLVM_TARGET(AArch64)
LLVM_TARGET(ARM)
LLVM_TARGET(Mips)
LLVM_TARGET(PowerPC)

View File

@ -0,0 +1,16 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64asmparser
SRCDIR= lib/Target/AArch64/AsmParser
INCDIR= lib/Target/AArch64
SRCS= AArch64AsmParser.cpp
TGHDRS= AArch64GenAsmMatcher \
AArch64GenInstrInfo \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -0,0 +1,42 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64codegen
SRCDIR= lib/Target/AArch64
SRCS= AArch64AddressTypePromotion.cpp \
AArch64AdvSIMDScalarPass.cpp \
AArch64AsmPrinter.cpp \
AArch64BranchRelaxation.cpp \
AArch64CleanupLocalDynamicTLSPass.cpp \
AArch64CollectLOH.cpp \
AArch64ConditionalCompares.cpp \
AArch64DeadRegisterDefinitionsPass.cpp \
AArch64ExpandPseudoInsts.cpp \
AArch64FastISel.cpp \
AArch64FrameLowering.cpp \
AArch64ISelDAGToDAG.cpp \
AArch64ISelLowering.cpp \
AArch64InstrInfo.cpp \
AArch64LoadStoreOptimizer.cpp \
AArch64MCInstLower.cpp \
AArch64PromoteConstant.cpp \
AArch64RegisterInfo.cpp \
AArch64SelectionDAGInfo.cpp \
AArch64StorePairSuppress.cpp \
AArch64Subtarget.cpp \
AArch64TargetMachine.cpp \
AArch64TargetObjectFile.cpp \
AArch64TargetTransformInfo.cpp
TGHDRS= AArch64GenCallingConv \
AArch64GenDAGISel \
AArch64GenFastISel \
AArch64GenInstrInfo \
AArch64GenMCPseudoLowering \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo \
Intrinsics
.include "../clang.lib.mk"

View File

@ -0,0 +1,24 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64desc
SRCDIR= lib/Target/AArch64/MCTargetDesc
SRCS= AArch64AsmBackend.cpp \
AArch64ELFObjectWriter.cpp \
AArch64ELFStreamer.cpp \
AArch64MCAsmInfo.cpp \
AArch64MCCodeEmitter.cpp \
AArch64MCExpr.cpp \
AArch64MCTargetDesc.cpp \
AArch64MachObjectWriter.cpp \
AArch64TargetStreamer.cpp
CFLAGS+= -I${LLVM_SRCS}/${SRCDIR}/..
TGHDRS= AArch64GenInstrInfo \
AArch64GenMCCodeEmitter \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -0,0 +1,20 @@
# $FreeBSD$
.include <src.opts.mk>
LIB= llvmaarch64disassembler
SRCDIR= lib/Target/AArch64/Disassembler
INCDIR= lib/Target/AArch64
SRCS= AArch64Disassembler.cpp
.if ${MK_CLANG_EXTRAS} != "no"
SRCS+= AArch64ExternalSymbolizer.cpp
.endif
TGHDRS= AArch64GenDisassemblerTables \
AArch64GenInstrInfo \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64info
SRCDIR= lib/Target/AArch64/TargetInfo
INCDIR= lib/Target/AArch64
SRCS= AArch64TargetInfo.cpp
TGHDRS= AArch64GenInstrInfo \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -0,0 +1,17 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64instprinter
SRCDIR= lib/Target/AArch64/InstPrinter
INCDIR= lib/Target/AArch64
SRCS= AArch64InstPrinter.cpp
TGHDRS= AArch64GenAsmWriter \
AArch64GenAsmWriter1 \
AArch64GenInstrInfo \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -0,0 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
LIB= llvmaarch64utils
SRCDIR= lib/Target/AArch64/Utils
INCDIR= lib/Target/AArch64
SRCS= AArch64BaseInfo.cpp
TGHDRS= AArch64GenInstrInfo \
AArch64GenRegisterInfo \
AArch64GenSubtargetInfo
.include "../clang.lib.mk"

View File

@ -70,6 +70,13 @@ LIBDEPS=clangfrontendtool \
llvminstrumentation \
llvmbitwriter \
llvmasmparser \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \

View File

@ -9,6 +9,13 @@ SRCS= llc.cpp
LIBDEPS=llvmirreader \
llvmasmparser \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \

View File

@ -82,67 +82,73 @@ LIBDEPS=\
clangbasic \
clanglex \
\
llvmoption \
llvmarmasmparser \
llvmarmcodegen \
llvminstrumentation \
llvmirreader \
llvmlinker \
llvmmipsasmparser \
llvmmipscodegen \
llvmmipsdisassembler \
llvmobjcarcopts \
llvmpowerpccodegen \
llvmx86asmparser \
llvmx86codegen \
llvmx86disassembler \
llvmmcjit \
llvmmcdisassembler \
llvmarmdisassembler \
llvmselectiondag \
llvmobjcarcopts \
llvmprofiledata \
llvmoption \
llvmlinker \
llvmmcjit \
llvmruntimedyld \
llvmjit \
llvmexecutionengine \
llvmirreader \
llvmipo \
llvmvectorize \
llvminstrumentation \
llvmbitwriter \
llvmasmparser \
llvminterpreter \
llvmjit \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \
llvmarmdesc \
llvmasmprinter \
llvmarminfo \
llvmarminstprinter \
llvmmipsdisassembler \
llvmmipscodegen \
llvmmipsasmparser \
llvmmipsdesc \
llvmmipsinfo \
llvmmipsinstprinter \
llvmpowerpcdesc \
llvmpowerpcinstprinter \
llvmpowerpcasmparser \
llvmpowerpcdisassembler \
llvmprofiledata \
llvmruntimedyld \
llvmvectorize \
llvmx86desc \
llvmx86instprinter \
llvmexecutionengine \
llvmcodegen \
llvmscalaropts \
llvmpowerpccodegen \
llvmpowerpcasmparser \
llvmpowerpcdesc \
llvmpowerpcinfo \
llvmpowerpcinstprinter \
llvmsparcdisassembler \
llvmsparccodegen \
llvmsparcasmparser \
llvmsparcdesc \
llvmsparcinfo \
llvmsparcinstprinter \
llvmarminfo \
llvmarminstprinter \
llvmmcparser \
llvmmipsinfo \
llvmpowerpcinfo \
llvmx86info \
llvmx86utils \
llvmobject \
llvmbitreader \
llvmx86disassembler \
llvmx86asmparser \
llvmx86codegen \
llvmselectiondag \
llvmasmprinter \
llvmcodegen \
llvmscalaropts \
llvminstcombine \
llvmtransformutils \
llvmipa \
llvmanalysis \
llvmtarget \
llvmx86desc \
llvmobject \
llvmmcparser \
llvmbitreader \
llvmcore \
llvmx86info \
llvmx86instprinter \
llvmmc \
llvmx86utils \
llvmsupport
.include "../clang.prog.mk"

View File

@ -7,7 +7,14 @@ PROG_CXX=llvm-ar
SRCDIR= tools/llvm-ar
SRCS= llvm-ar.cpp
LIBDEPS=llvmarmdisassembler \
LIBDEPS=llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \
llvmarmdesc \

View File

@ -10,6 +10,13 @@ SRCS= llvm-mc.cpp \
Disassembler.cpp
LIBDEPS=llvmmcdisassembler \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \

View File

@ -7,7 +7,14 @@ PROG_CXX=llvm-nm
SRCDIR= tools/llvm-nm
SRCS= llvm-nm.cpp
LIBDEPS=llvmarmdisassembler \
LIBDEPS=llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \
llvmarmdesc \

View File

@ -16,6 +16,13 @@ SRCS= llvm-objdump.cpp \
LIBDEPS=llvmmcdisassembler \
llvmmcanalysis \
llvmdebuginfo \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \

View File

@ -14,6 +14,13 @@ LIBDEPS=llvmdebuginfo \
llvmjit \
llvmexecutionengine \
llvmruntimedyld \
llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \

View File

@ -15,7 +15,14 @@ SRCS= AnalysisWrappers.cpp \
opt.cpp
TGHDRS= Intrinsics
LIBDEPS=llvmarmdisassembler \
LIBDEPS=llvmaarch64disassembler \
llvmaarch64codegen \
llvmaarch64asmparser \
llvmaarch64desc \
llvmaarch64info \
llvmaarch64instprinter \
llvmaarch64utils \
llvmarmdisassembler \
llvmarmcodegen \
llvmarmasmparser \
llvmarmdesc \