llvm-project/llvm/lib/Target/AArch64
Jessica Paquette 469d42fcf6 [GlobalISel] When a tail call is emitted in a block, stop translating it
This fixes a crash in tail call translation caused by assume and lifetime_end
intrinsics.

It's possible to have instructions other than a return after a tail call which
will still have `Analysis::isInTailCallPosition` return true. (Namely,
lifetime_end and assume intrinsics.)

If we emit a tail call, we should stop translating instructions in the block.
Otherwise, we can end up emitting an extra return, or dead instructions in
general. This makes the verifier unhappy, and is generally unfortunate for
codegen.

This also removes the code from AArch64CallLowering that checks if we have a
tail call when lowering a return. This is covered by the new code now.

Also update call-translator-tail-call.ll to show that we now properly tail call
in the presence of lifetime_end and assume.

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

llvm-svn: 371572
2019-09-10 23:34:45 +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 [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +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
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 [SVE][Inline-Asm] Support for SVE asm operands 2019-09-02 16:12:31 +00:00
AArch64BranchTargets.cpp
AArch64CallLowering.cpp [GlobalISel] When a tail call is emitted in a block, stop translating it 2019-09-10 23:34:45 +00:00
AArch64CallLowering.h [AArch64][GlobalISel] Support sibling calls with mismatched calling conventions 2019-09-10 23:25:12 +00:00
AArch64CallingConvention.cpp
AArch64CallingConvention.h
AArch64CallingConvention.td Relanding r368987 [AArch64] Change location of frame-record within callee-save area. 2019-08-16 15:42:28 +00:00
AArch64CleanupLocalDynamicTLSPass.cpp
AArch64CollectLOH.cpp
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
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
AArch64ExpandImm.h
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 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 Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64ISelLowering.cpp [Alignment][NFC] Use Align with TargetLowering::setPrefFunctionAlignment 2019-09-06 15:03:49 +00:00
AArch64ISelLowering.h [SelectionDAG] Don't generate libcalls for wide shifts on Windows (PR42711) 2019-08-28 13:55:10 +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] Add combine patterns for fp16 fmla 2019-09-07 20:24:51 +00:00
AArch64InstrInfo.h [AArch64] NFC: Add generic StackOffset to describe scalable offsets. 2019-08-06 13:06:40 +00:00
AArch64InstrInfo.td [AArch64][GlobalISel] Don't import i64imm_32bit pattern at -O0 2019-09-03 17:21:12 +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
AArch64MachineFunctionInfo.h Basic codegen for MTE stack tagging. 2019-07-17 19:24:02 +00:00
AArch64MacroFusion.cpp
AArch64MacroFusion.h
AArch64PBQPRegAlloc.cpp [aarch64] Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-12 22:40:53 +00:00
AArch64PBQPRegAlloc.h
AArch64PerfectShuffle.h
AArch64PfmCounters.td
AArch64PreLegalizerCombiner.cpp GlobalISel: add combiner to form indexed loads. 2019-09-09 10:04:23 +00:00
AArch64PromoteConstant.cpp
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
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
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
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
AArch64SchedKryo.td [AArch64][SVE2] Add SVE2 target features to backend and TargetParser 2019-05-13 10:10:24 +00:00
AArch64SchedKryoDetails.td
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
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
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 [LLVM][Alignment] Make functions using log of alignment explicit 2019-09-05 10:00:22 +00:00
AArch64SystemOperands.td [AArch64] Update MTE system register encodings 2019-08-21 09:09:56 +00:00
AArch64TargetMachine.cpp GlobalISel: add combiner to form indexed loads. 2019-09-09 10:04:23 +00:00
AArch64TargetMachine.h
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