[mips] Restrict tail call optimization
authorSimon Dardis <simon.dardis@imgtec.com>
Sun, 20 Nov 2016 21:23:08 +0000 (21:23 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Sun, 20 Nov 2016 21:23:08 +0000 (21:23 +0000)
commit1dcb9110612abc47405be50a0fc20661cef2f926
tree120ab6bc4227a9a13d964b8ac8ec3c19804de29a
parent0878d46416a99382df38b93a38f8e47fc6b95e3a
[mips] Restrict tail call optimization

The tail call optimization was being used without proper consideration of
ABI requirements for saving and restoring the GP. This patch restricts tail
call optimization to functions within the same translation unit.

Reviewers: vkalintiris

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

llvm-svn: 287505
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/test/CodeGen/Mips/fastcc.ll
llvm/test/CodeGen/Mips/i64arg.ll
llvm/test/CodeGen/Mips/lazy-binding.ll
llvm/test/CodeGen/Mips/llvm-ir/call.ll
llvm/test/CodeGen/Mips/tailcall/tail-call-arguments-clobber.ll
llvm/test/CodeGen/Mips/tailcall/tailcall-wrong-isa.ll
llvm/test/CodeGen/Mips/tailcall/tailcall.ll