[AArch64] Add Tiny Code Model for AArch64
authorDavid Green <david.green@arm.com>
Wed, 22 Aug 2018 11:31:39 +0000 (11:31 +0000)
committerDavid Green <david.green@arm.com>
Wed, 22 Aug 2018 11:31:39 +0000 (11:31 +0000)
commit9dd1d451d9719aa91b3bdd59c0c667983e1baf05
treef3bc770a3ce8a449b97ddd3b29f37efea905a543
parentbb8e64e7f5ad448bf04ba84c995b8a7cbf9bb7e4
[AArch64] Add Tiny Code Model for AArch64

This adds the plumbing for the Tiny code model for the AArch64 backend. This,
instead of loading addresses through the normal ADRP;ADD pair used in the Small
model, uses a single ADR. The 21 bit range of an ADR means that the code and
its statically defined symbols need to be within 1MB of each other.

This makes it mostly interesting for embedded applications where we want to fit
as much as we can in as small a space as possible.

Differential Revision: https://reviews.llvm.org/D49673

llvm-svn: 340397
34 files changed:
llvm/bindings/go/llvm/target.go
llvm/docs/CommandGuide/lli.rst
llvm/include/llvm-c/TargetMachine.h
llvm/include/llvm/CodeGen/CommandFlags.inc
llvm/include/llvm/Support/CodeGen.h
llvm/include/llvm/Target/CodeGenCWrappers.h
llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/lib/Target/AArch64/AArch64Subtarget.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/X86/X86Subtarget.cpp
llvm/test/CodeGen/AArch64/GlobalISel/select-gv-cmodel-tiny.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
llvm/test/CodeGen/AArch64/arm64-tls-execs.ll
llvm/test/CodeGen/AArch64/blockaddress.ll
llvm/test/CodeGen/AArch64/code-model-tiny-abs.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/extern-weak.ll
llvm/test/CodeGen/AArch64/fpimm.ll
llvm/test/CodeGen/AArch64/jump-table.ll
llvm/test/CodeGen/AArch64/literal_pools_float.ll
llvm/test/CodeGen/AArch64/tiny_model.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/tiny_supported.ll [new file with mode: 0644]
llvm/test/MC/AArch64/basic-a64-diagnostics.s