OSDN Git Service

[X86] Clean up the tail call eligibility logic
authorReid Kleckner <rnk@google.com>
Fri, 23 Oct 2015 19:35:38 +0000 (19:35 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 23 Oct 2015 19:35:38 +0000 (19:35 +0000)
commit34f572a0d2692e64f922d960920f5ebb11dce8f4
treebacb5733a898b98f67aa7963e914c81b10476786
parent2f7d3cda4ab0b5e4551bef8a8809e8c8a4bccf58
[X86] Clean up the tail call eligibility logic

Summary:
The logic here isn't straightforward because our support for
TargetOptions::GuaranteedTailCallOpt.

Also fix a bug where we were allowing tail calls to cdecl functions from
fastcall and vectorcall functions. We were special casing thiscall and
stdcall callers rather than checking for any convention that requires
clearing stack arguments before returning.

Reviewers: hans

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14024

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251137 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/tailcall-msvc-conventions.ll [new file with mode: 0644]