diff options
author | Jessica Paquette <jpaquette@apple.com> | 2019-09-05 20:18:34 +0000 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2019-09-05 20:18:34 +0000 |
commit | 20e866709882dbad73d9cbb99f056cd6ea113498 (patch) | |
tree | 95c22040ef9077d06762aeb46975ae32732913b1 /llvm/lib/CodeGen/GlobalISel/CallLowering.cpp | |
parent | 31817731167135870259ef1e7387746345b96a2f (diff) | |
download | bcm5719-llvm-20e866709882dbad73d9cbb99f056cd6ea113498.tar.gz bcm5719-llvm-20e866709882dbad73d9cbb99f056cd6ea113498.zip |
Recommit "[AArch64][GlobalISel] Teach AArch64CallLowering to handle basic sibling calls"
Recommit basic sibling call lowering (https://reviews.llvm.org/D67189)
The issue was that if you have a return type other than void, call lowering
will emit COPYs to get the return value after the call.
Disallow sibling calls other than ones that return void for now. Also
proactively disable swifterror tail calls for now, since there's a similar issue
with COPYs there.
Update call-translator-tail-call.ll to include test cases for each of these
things.
llvm-svn: 371114
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/CallLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/CallLowering.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp index d433155160b..1c8e4541817 100644 --- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp +++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp @@ -64,7 +64,9 @@ bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, Info.CallConv = CS.getCallingConv(); Info.SwiftErrorVReg = SwiftErrorVReg; Info.IsMustTailCall = CS.isMustTailCall(); - + Info.IsTailCall = CS.isTailCall() && + isInTailCallPosition(CS, MIRBuilder.getMF().getTarget()); + Info.IsVarArg = CS.getFunctionType()->isVarArg(); return lowerCall(MIRBuilder, Info); } |