2014-05-24 20:50:23 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS AArch64.td)
|
|
|
|
|
2018-04-04 20:37:44 +08:00
|
|
|
tablegen(LLVM AArch64GenAsmMatcher.inc -gen-asm-matcher)
|
2014-05-24 20:50:23 +08:00
|
|
|
tablegen(LLVM AArch64GenAsmWriter.inc -gen-asm-writer)
|
|
|
|
tablegen(LLVM AArch64GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
|
2018-04-04 20:37:44 +08:00
|
|
|
tablegen(LLVM AArch64GenCallingConv.inc -gen-callingconv)
|
2014-05-24 20:50:23 +08:00
|
|
|
tablegen(LLVM AArch64GenDAGISel.inc -gen-dag-isel)
|
2018-04-04 20:37:44 +08:00
|
|
|
tablegen(LLVM AArch64GenDisassemblerTables.inc -gen-disassembler)
|
2014-05-24 20:50:23 +08:00
|
|
|
tablegen(LLVM AArch64GenFastISel.inc -gen-fast-isel)
|
2018-04-04 20:37:44 +08:00
|
|
|
tablegen(LLVM AArch64GenGlobalISel.inc -gen-global-isel)
|
|
|
|
tablegen(LLVM AArch64GenInstrInfo.inc -gen-instr-info)
|
|
|
|
tablegen(LLVM AArch64GenMCCodeEmitter.inc -gen-emitter)
|
|
|
|
tablegen(LLVM AArch64GenMCPseudoLowering.inc -gen-pseudo-lowering)
|
|
|
|
tablegen(LLVM AArch64GenRegisterBank.inc -gen-register-bank)
|
|
|
|
tablegen(LLVM AArch64GenRegisterInfo.inc -gen-register-info)
|
2014-05-24 20:50:23 +08:00
|
|
|
tablegen(LLVM AArch64GenSubtargetInfo.inc -gen-subtarget)
|
2016-07-06 05:23:04 +08:00
|
|
|
tablegen(LLVM AArch64GenSystemOperands.inc -gen-searchable-tables)
|
|
|
|
|
2014-05-24 20:50:23 +08:00
|
|
|
add_public_tablegen_target(AArch64CommonTableGen)
|
|
|
|
|
|
|
|
add_llvm_target(AArch64CodeGen
|
2014-08-08 20:33:21 +08:00
|
|
|
AArch64A57FPLoadBalancing.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64AdvSIMDScalarPass.cpp
|
|
|
|
AArch64AsmPrinter.cpp
|
[AArch64][v8.5A] Branch Target Identification code-generation pass
The Branch Target Identification extension, introduced to AArch64 in
Armv8.5-A, adds the BTI instruction, which is used to mark valid targets
of indirect branches. When enabled, the processor will trap if an
instruction in a protected page tries to perform an indirect branch to
any instruction other than a BTI. The BTI instruction uses encodings
which were NOPs in earlier versions of the architecture, so BTI-enabled
code will still run on earlier hardware, just without the extra
protection.
There are 3 variants of the BTI instruction, which are valid targets for
different kinds or branches:
- BTI C can be targeted by call instructions, and is inteneded to be
used at function entry points. These are the BLR instruction, as well
as BR with x16 or x17. These BR instructions are allowed for use in
PLT entries, and we can also use them to allow indirect tail-calls.
- BTI J can be targeted by BR only, and is intended to be used by jump
tables.
- BTI JC acts ab both a BTI C and a BTI J instruction, and can be
targeted by any BLR or BR instruction.
Note that RET instructions are not restricted by branch target
identification, the reason for this is that return addresses can be
protected more effectively using return address signing. Direct branches
and calls are also unaffected, as it is assumed that an attacker cannot
modify executable pages (if they could, they wouldn't need to do a
ROP/JOP attack).
This patch adds a MachineFunctionPass which:
- Adds a BTI C at the start of every function which could be indirectly
called (either because it is address-taken, or externally visible so
could be address-taken in another translation unit).
- Adds a BTI J at the start of every basic block which could be
indirectly branched to. This could be either done by a jump table, or
by taking the address of the block (e.g. the using GCC label values
extension).
We only need to use BTI JC when a function is indirectly-callable, and
takes the address of the entry block. I've not been able to trigger this
from C or IR, but I've included a MIR test just in case.
Using BTI C at function entries relies on the fact that no other code in
BTI-protected pages uses indirect tail-calls, unless they use x16 or x17
to hold the address. I'll add that code-generation restriction as a
separate patch.
Differential revision: https://reviews.llvm.org/D52867
llvm-svn: 343967
2018-10-08 22:04:24 +08:00
|
|
|
AArch64BranchTargets.cpp
|
2017-08-04 05:52:25 +08:00
|
|
|
AArch64CallLowering.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64CleanupLocalDynamicTLSPass.cpp
|
|
|
|
AArch64CollectLOH.cpp
|
[AArch64] Prefer Bcc to CBZ/CBNZ/TBZ/TBNZ when NZCV flags can be set for "free".
This patch contains a pass that transforms CBZ/CBNZ/TBZ/TBNZ instructions into a
conditional branch (Bcc), when the NZCV flags can be set for "free". This is
preferred on targets that have more flexibility when scheduling Bcc
instructions as compared to CBZ/CBNZ/TBZ/TBNZ (assuming all other variables are
equal). This can reduce register pressure and is also the default behavior for
GCC.
A few examples:
add w8, w0, w1 -> cmn w0, w1 ; CMN is an alias of ADDS.
cbz w8, .LBB_2 -> b.eq .LBB0_2 ; single def/use of w8 removed.
add w8, w0, w1 -> adds w8, w0, w1 ; w8 has multiple uses.
cbz w8, .LBB1_2 -> b.eq .LBB1_2
sub w8, w0, w1 -> subs w8, w0, w1 ; w8 has multiple uses.
tbz w8, #31, .LBB6_2 -> b.ge .LBB6_2
In looking at all current sub-target machine descriptions, this transformation
appears to be either positive or neutral.
Differential Revision: https://reviews.llvm.org/D34220.
llvm-svn: 306144
2017-06-24 03:20:12 +08:00
|
|
|
AArch64CondBrTuning.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64ConditionalCompares.cpp
|
|
|
|
AArch64DeadRegisterDefinitionsPass.cpp
|
|
|
|
AArch64ExpandPseudoInsts.cpp
|
2017-07-15 05:44:12 +08:00
|
|
|
AArch64FalkorHWPFFix.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64FastISel.cpp
|
2014-10-13 18:12:35 +08:00
|
|
|
AArch64A53Fix835769.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64FrameLowering.cpp
|
2014-09-05 10:55:24 +08:00
|
|
|
AArch64ConditionOptimizer.cpp
|
[AArch64] Add pass to remove redundant copy after RA
Summary:
This change will add a pass to remove unnecessary zero copies in target blocks
of cbz/cbnz instructions. E.g., the copy instruction in the code below can be
removed because the cbz jumps to BB1 when x0 is zero :
BB0:
cbz x0, .BB1
BB1:
mov x0, xzr
Jun
Reviewers: gberry, jmolloy, HaoLiu, MatzeB, mcrosier
Subscribers: mcrosier, mssimpso, haicheng, bmakam, llvm-commits, aemerson, rengolin
Differential Revision: http://reviews.llvm.org/D16203
llvm-svn: 261004
2016-02-17 04:02:39 +08:00
|
|
|
AArch64RedundantCopyElimination.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64ISelDAGToDAG.cpp
|
|
|
|
AArch64ISelLowering.cpp
|
|
|
|
AArch64InstrInfo.cpp
|
2017-08-04 05:52:25 +08:00
|
|
|
AArch64InstructionSelector.cpp
|
|
|
|
AArch64LegalizerInfo.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64LoadStoreOptimizer.cpp
|
2017-02-01 10:54:34 +08:00
|
|
|
AArch64MacroFusion.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64MCInstLower.cpp
|
Re-commit: [globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64
Summary: Depends on D45541
Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson
Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D45543
The previous commit failed portions of the test-suite on GreenDragon due to
duplicate COPY instructions and iterator invalidation. Both issues have now
been fixed. To assist with this, a helper (cloneVirtualRegister) has been added
to MachineRegisterInfo that can be used to get another register that has the same
type and class/bank as an existing one.
llvm-svn: 343654
2018-10-03 10:12:17 +08:00
|
|
|
AArch64PreLegalizerCombiner.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64PromoteConstant.cpp
|
2014-09-10 22:06:10 +08:00
|
|
|
AArch64PBQPRegAlloc.cpp
|
2017-08-04 05:52:25 +08:00
|
|
|
AArch64RegisterBankInfo.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
AArch64RegisterInfo.cpp
|
|
|
|
AArch64SelectionDAGInfo.cpp
|
|
|
|
AArch64StorePairSuppress.cpp
|
|
|
|
AArch64Subtarget.cpp
|
|
|
|
AArch64TargetMachine.cpp
|
|
|
|
AArch64TargetObjectFile.cpp
|
|
|
|
AArch64TargetTransformInfo.cpp
|
2017-12-09 06:04:13 +08:00
|
|
|
AArch64SIMDInstrOpt.cpp
|
2014-05-24 20:50:23 +08:00
|
|
|
|
2016-11-17 12:36:50 +08:00
|
|
|
DEPENDS
|
|
|
|
intrinsics_gen
|
|
|
|
)
|
2014-05-24 20:50:23 +08:00
|
|
|
|
|
|
|
add_subdirectory(AsmParser)
|
|
|
|
add_subdirectory(Disassembler)
|
|
|
|
add_subdirectory(InstPrinter)
|
|
|
|
add_subdirectory(MCTargetDesc)
|
2018-04-23 20:49:34 +08:00
|
|
|
add_subdirectory(TargetInfo)
|
2014-05-24 20:50:23 +08:00
|
|
|
add_subdirectory(Utils)
|