[PATCH] D49673: [AArch64] Add Tiny Code Model for AArch64

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 08:36:25 PDT 2018


dmgreen created this revision.
dmgreen added reviewers: t.p.northover, olista01, john.brawn.
Herald added a reviewer: deadalnix.
Herald added a reviewer: javed.absar.
Herald added a subscriber: kristof.beyls.

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 want to fit as much as we can in as small a space as possible.


https://reviews.llvm.org/D49673

Files:
  bindings/go/llvm/target.go
  include/llvm-c/TargetMachine.h
  include/llvm/CodeGen/CommandFlags.inc
  include/llvm/Support/CodeGen.h
  include/llvm/Target/CodeGenCWrappers.h
  lib/Target/AArch64/AArch64FrameLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/AArch64/AArch64InstrInfo.td
  lib/Target/AArch64/AArch64InstructionSelector.cpp
  lib/Target/AArch64/AArch64Subtarget.cpp
  lib/Target/AArch64/AArch64Subtarget.h
  lib/Target/AArch64/AArch64TargetMachine.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
  lib/Target/ARM/ARMFrameLowering.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  test/CodeGen/AArch64/GlobalISel/select-gv-cmodel-tiny.mir
  test/CodeGen/AArch64/blockaddress.ll
  test/CodeGen/AArch64/code-model-tiny-abs.ll
  test/CodeGen/AArch64/extern-weak.ll
  test/CodeGen/AArch64/fpimm.ll
  test/CodeGen/AArch64/jump-table.ll
  test/CodeGen/AArch64/literal_pools_float.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49673.156782.patch
Type: text/x-patch
Size: 27434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180723/7fc874b6/attachment.bin>


More information about the llvm-commits mailing list