1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/lib/Target/AArch64
Sander de Smalen b7a99b0894 [AArch64] Change location of frame-record within callee-save area.
This patch changes the location of the frame-record (FP, LR) to the 
bottom of the callee-saved area. According to the AAPCS the location of
the frame-record within the stackframe is unspecified (section 5.2.3 The 
Frame Pointer), so the compiler should be free to choose a different
location.

The reason for changing the location of the frame-record is to prepare
the frame for allocating an SVE area below the callee-saves. This way the 
compiler can use the VL-scaled addressing modes to directly access SVE 
objects from the frame-pointer.

            :                :   
        | stack |        | stack |
        |  args |        |  args |
        +-------+        +-------+
        |  x30  |        |  x19  |
        |  x29  |        |  x20  |
  FP -> |- - - -|        |  x21  |
        |  x19  |   ==>  |  x22  |
        |  x20  |        |- - - -|
        |  x21  |        |  x30  |
        |  x22  |        |  x29  |
        +-------+        +-------+ <- FP
        |///////|        |///////|         // realignment gap 
        |- - - -|        |- - - -|
        |spills/|        |spills/|
        | locals|        | locals|
  SP -> +-------+        +-------+ <- SP

Things to point out:
- The algorithm to find a paired register should be prevented from
  accidentally pairing some callee-saved register with LR that is not 
  FP, since they should always be paired together when the frame
  has a frame-record.
- For Darwin platforms the location of the frame-record is unchanged,
  since the unwind encoding does not allow for encoding this position
  dynamically and other tools currently depend on the former layout. 

Reviewers: efriedma, rovka, rengolin, thegameg, greened, t.p.northover

Reviewed By: efriedma

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

llvm-svn: 368987
2019-08-15 10:34:16 +00:00
..
AsmParser [AArch64][SVE2] Rename bitperm feature to sve2-bitperm 2019-07-26 15:57:50 +00:00
Disassembler Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MCTargetDesc MC: AArch64: Add support for prel_g* relocation specifiers. 2019-07-18 16:54:33 +00:00
TargetInfo Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
Utils AArch64: Add a tagged-globals backend feature. 2019-07-31 20:14:19 +00:00
AArch64.h Basic MTE stack tagging instrumentation. 2019-07-17 19:24:12 +00:00
AArch64.td AArch64: Add a tagged-globals backend feature. 2019-07-31 20:14:19 +00:00
AArch64A53Fix835769.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64A57FPLoadBalancing.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64AdvSIMDScalarPass.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64AsmPrinter.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64BranchTargets.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CallingConvention.cpp [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
AArch64CallingConvention.h [AArch64] Include AArch64GenCallingConv.inc once 2019-01-28 21:28:40 +00:00
AArch64CallingConvention.td [AArch64] Change location of frame-record within callee-save area. 2019-08-15 10:34:16 +00:00
AArch64CallLowering.cpp GlobalISel: pack various parameters for lowerCall into a struct. 2019-08-09 08:26:38 +00:00
AArch64CallLowering.h GlobalISel: pack various parameters for lowerCall into a struct. 2019-08-09 08:26:38 +00:00
AArch64CleanupLocalDynamicTLSPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CollectLOH.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64CompressJumpTables.cpp [AArch64] Fix scan-build null/uninitialized pointer warnings. NFCI. 2019-05-08 16:27:24 +00:00
AArch64CondBrTuning.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64ConditionalCompares.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64ConditionOptimizer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64DeadRegisterDefinitionsPass.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64ExpandImm.cpp [AArch64] Prefer "mov" over "orr" to materialize constants. 2019-03-25 21:25:28 +00:00
AArch64ExpandImm.h [AArch64] Refactor floating point materialization. NFC 2019-03-18 18:23:23 +00:00
AArch64ExpandPseudoInsts.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64FalkorHWPFFix.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64FastISel.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64FrameLowering.cpp [AArch64] Change location of frame-record within callee-save area. 2019-08-15 10:34:16 +00:00
AArch64FrameLowering.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64GenRegisterBankInfo.def [AArch64][GlobalISel] Overhaul legalization & isel or shifts to select immediate forms. 2019-07-03 01:49:06 +00:00
AArch64InstrAtomics.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64InstrFormats.td [AArch64][GlobalISel] Support the neg_addsub_shifted_imm32 pattern 2019-08-02 18:12:53 +00:00
AArch64InstrInfo.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64InstrInfo.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64InstrInfo.td [AArch64] Add support for Transactional Memory Extension (TME) 2019-07-31 12:52:17 +00:00
AArch64InstructionSelector.cpp [AArch64][GlobalISel] Custom selection for s8 load acquire. 2019-08-14 21:30:30 +00:00
AArch64ISelDAGToDAG.cpp Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64ISelLowering.cpp [AArch64] Remove incorrect usage of MONonTemporal. 2019-08-13 23:12:14 +00:00
AArch64ISelLowering.h [Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 fold 2019-07-24 22:57:22 +00:00
AArch64LegalizerInfo.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64LegalizerInfo.h [GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later. 2019-07-19 00:24:45 +00:00
AArch64LoadStoreOptimizer.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64MachineFunctionInfo.h Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64MacroFusion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MacroFusion.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64MCInstLower.cpp AArch64: Add a tagged-globals backend feature. 2019-07-31 20:14:19 +00:00
AArch64MCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PBQPRegAlloc.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64PBQPRegAlloc.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PerfectShuffle.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PfmCounters.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64PreLegalizerCombiner.cpp [GISel]: Add GISelKnownBits analysis 2019-08-06 17:18:29 +00:00
AArch64PromoteConstant.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
AArch64RedundantCopyElimination.cpp CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
AArch64RegisterBankInfo.cpp [AArch64][GlobalISel] RBS: Treat s128s like vectors when unmerging. 2019-08-13 23:51:20 +00:00
AArch64RegisterBankInfo.h [AArch64][GlobalISel] Overhaul legalization & isel or shifts to select immediate forms. 2019-07-03 01:49:06 +00:00
AArch64RegisterBanks.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64RegisterInfo.cpp [AArch64] Change location of frame-record within callee-save area. 2019-08-15 10:34:16 +00:00
AArch64RegisterInfo.h CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
AArch64RegisterInfo.td [AArch64] Support reserving arbitrary general purpose registers 2019-02-13 17:28:47 +00:00
AArch64SchedA53.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedA57.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedA57WriteRes.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedCyclone.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedExynosM1.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedExynosM3.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedExynosM4.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedFalkor.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedFalkorDetails.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedKryo.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedKryoDetails.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SchedPredExynos.td [AArch64] Update for Exynos 2019-05-02 22:01:39 +00:00
AArch64SchedPredicates.td [AArch64] Update for Exynos 2019-05-02 22:01:39 +00:00
AArch64SchedThunderX2T99.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedThunderX.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64Schedule.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64SelectionDAGInfo.cpp Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64SelectionDAGInfo.h Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64SIMDInstrOpt.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64SpeculationHardening.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64StackOffset.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64StackTagging.cpp Speculative fix for stack-tagging.ll failure. 2019-07-17 21:27:44 +00:00
AArch64StorePairSuppress.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64Subtarget.cpp [GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained. 2019-08-13 06:26:59 +00:00
AArch64Subtarget.h [GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained. 2019-08-13 06:26:59 +00:00
AArch64SVEInstrInfo.td [AArch64][SVE2] Load/store instruction fixes 2019-07-31 09:10:36 +00:00
AArch64SystemOperands.td [AArch64] Define ETE and TRBE system registers 2019-07-26 09:19:08 +00:00
AArch64TargetMachine.cpp Basic MTE stack tagging instrumentation. 2019-07-17 19:24:12 +00:00
AArch64TargetMachine.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64TargetTransformInfo.cpp [AArch64] Expand bcmp() for small block lengths 2019-08-05 18:09:14 +00:00
AArch64TargetTransformInfo.h [AArch64] Expand bcmp() for small block lengths 2019-08-05 18:09:14 +00:00
CMakeLists.txt Basic MTE stack tagging instrumentation. 2019-07-17 19:24:12 +00:00
LLVMBuild.txt [AArch64] Add dependency from AArch64CodeGen to TransformUtils to fix -DBUILD_SHARED_LIBS=on link error after D64173/r366361 2019-07-18 01:53:08 +00:00
SVEInstrFormats.td [AArch64][SVE2] Load/store instruction fixes 2019-07-31 09:10:36 +00:00