From 9ccea99165d2e5cb4fba57b0d02e56651e2ae28c Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Thu, 11 Oct 2007 19:40:01 +0000 Subject: Added tail call optimization to the x86 back end. It can be enabled by passing -tailcallopt to llc. The optimization is performed if the following conditions are satisfied: * caller/callee are fastcc * elf/pic is disabled OR elf/pic enabled + callee is in module + callee has visibility protected or hidden llvm-svn: 42870 --- llvm/lib/Target/X86/X86InstrInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Target/X86/X86InstrInfo.cpp') diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 986aa0bc806..9d5e6371199 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -706,6 +706,8 @@ bool X86InstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { if (MBB.empty()) return false; switch (MBB.back().getOpcode()) { + case X86::TCRETURNri: + case X86::TCRETURNdi: case X86::RET: // Return. case X86::RETI: case X86::TAILJMPd: -- cgit v1.2.3