llvm-project/llvm/lib/Target/AArch64
Jessica Paquette 727328ab63 [AArch64][GlobalISel] Tail call memory intrinsics
Because memory intrinsics are handled differently than other calls, we need to
check them for tail call eligiblity in the legalizer. This allows us to still
inline them when it's beneficial to do so, but also tail call when possible.

This adds simple tail calling support for when the intrinsic is followed by a
return.

It ports the attribute checks from `TargetLowering::isInTailCallPosition` into
a similarly-named function in LegalizerHelper.cpp. The target-specific
`isUsedByReturnOnly` hook is not ported here.

Update tailcall-mem-intrinsics.ll to show that GlobalISel can now tail call
memory intrinsics.

Update legalize-memcpy-et-al.mir to have a case where we don't tail call.

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

llvm-svn: 371893
2019-09-13 20:25:58 +00:00
..
AsmParser [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Disassembler Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MCTargetDesc AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
TargetInfo Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
Utils MemTag: unchecked load/store optimization. 2019-08-30 17:23:02 +00:00
AArch64.h GlobalISel: add combiner to form indexed loads. 2019-09-09 10:04:23 +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 [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +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: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +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
AArch64CallLowering.cpp [AArch64][GlobalISel] Tail call memory intrinsics 2019-09-13 20:25:58 +00:00
AArch64CallLowering.h [AArch64][GlobalISel] Support sibling calls with outgoing arguments 2019-09-12 22:10:36 +00:00
AArch64CallingConvention.cpp AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64CallingConvention.h AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64CallingConvention.td AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +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 AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +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
AArch64ConditionOptimizer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ConditionalCompares.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +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: fix EXPENSIVE_CHECKS for arm64_32. 2019-09-13 18:55:38 +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: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64FrameLowering.cpp Relanding r368987 [AArch64] Change location of frame-record within callee-save area. 2019-08-16 15:42:28 +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
AArch64ISelDAGToDAG.cpp [aarch64] move custom isel of extract_vector_elt to td file - NFC 2019-09-13 19:28:30 +00:00
AArch64ISelLowering.cpp AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64ISelLowering.h AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64InstrAtomics.td [GlobalISel][AArch64] Select llvm.aarch64.stxr* intrinsics. 2019-08-29 16:55:55 +00:00
AArch64InstrFormats.td [AArch64][GlobalISel] Select arithmetic extended register patterns 2019-08-29 21:53:58 +00:00
AArch64InstrInfo.cpp [AArch64] MachineCombiner FMA matching. NFC. 2019-09-13 07:38:54 +00:00
AArch64InstrInfo.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64InstrInfo.td [aarch64] move custom isel of extract_vector_elt to td file - NFC 2019-09-13 19:28:30 +00:00
AArch64InstructionSelector.cpp [AArch64][GlobalISel] Select arithmetic extended register patterns 2019-08-29 21:53:58 +00:00
AArch64LegalizerInfo.cpp [AArch64][GlobalISel] Legalize 128 bit divisions to libcalls. 2019-09-03 21:42:32 +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
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
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
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 GlobalISel: add combiner to form indexed loads. 2019-09-09 10:04:23 +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 MemTag: unchecked load/store optimization. 2019-08-30 17:23:02 +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
AArch64SIMDInstrOpt.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64SVEInstrInfo.td [AArch64][SVE] Implement abs and neg intrinsics 2019-09-09 11:21:14 +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
AArch64SchedThunderX.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedThunderX2T99.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 AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64SelectionDAGInfo.h Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64SpeculationHardening.cpp Do a sweep of symbol internalization. NFC. 2019-08-23 19:59:23 +00:00
AArch64StackOffset.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64StackTagging.cpp Refactor isPointerOffset (NFC). 2019-08-19 21:08:04 +00:00
AArch64StackTaggingPreRA.cpp MemTag: unchecked load/store optimization. 2019-08-30 17:23:02 +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 [LLVM][Alignment] Make functions using log of alignment explicit 2019-09-05 10:00:22 +00:00
AArch64Subtarget.h AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +00:00
AArch64SystemOperands.td [AArch64] Update MTE system register encodings 2019-08-21 09:09:56 +00:00
AArch64TargetMachine.cpp AArch64: support arm64_32, an ILP32 slice for watchOS. 2019-09-12 10:22:23 +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 [MachO][TLOF] Use hasLocalLinkage to determine if indirect symbol is local 2019-08-22 16:59:00 +00:00
AArch64TargetObjectFile.h [MachO][TLOF] Use hasLocalLinkage to determine if indirect symbol is local 2019-08-22 16:59:00 +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 MemTag: unchecked load/store optimization. 2019-08-30 17:23:02 +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][SVE] Implement abs and neg intrinsics 2019-09-09 11:21:14 +00:00