llvm-6502/test
Bill Wendling 072ebe59e2 The basic problem is that some mainstream programs cannot deal with the way
clang optimizes tail calls, as in this example:

int foo(void);
int bar(void) {
 return foo();
}

where the call is transformed to:

  calll .L0$pb
.L0$pb:
  popl  %eax
.Ltmp0:
  addl  $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
  movl  foo@GOT(%eax), %eax
  popl  %ebp
  jmpl  *%eax                   # TAILCALL

However, the GOT references must all be resolved at dlopen() time, and so this
approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which
usually populates the PLT with stubs that perform the actual resolving.

This patch changes X86TargetLowering::LowerCall() to skip tail call
optimization, if the called function is a global or external symbol.

Patch by Dimitry Andric!

PR15086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195318 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 07:04:30 +00:00
..
Analysis Use correct size for address space in BasicAA. 2013-11-16 00:36:43 +00:00
Assembler Make it explicit that nulls are not allowed in names. 2013-11-19 21:12:39 +00:00
Bindings
Bitcode The 'optnone' attribute means don't inline anything into this function 2013-11-18 21:44:03 +00:00
BugPoint
CodeGen The basic problem is that some mainstream programs cannot deal with the way 2013-11-21 07:04:30 +00:00
DebugInfo DebugInfo: Partial implementation of DWARF type units. 2013-11-19 23:08:21 +00:00
ExecutionEngine [mips] Resolve relocation for the stubs in MCJIT when load address is known 2013-11-19 21:56:00 +00:00
Feature The 'optnone' attribute means don't inline anything into this function 2013-11-18 21:44:03 +00:00
FileCheck FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565 2013-11-20 13:25:05 +00:00
Instrumentation [ASan] Fix PR17867 - make sure ASan doesn't crash if use-after-scope and use-after-return are combined. 2013-11-18 14:53:55 +00:00
Integer
JitListener
Linker
LTO
MC reverts 195057 per request 2013-11-19 20:53:28 +00:00
Object
Other
TableGen
tools llvm-cov: Added file checksum to gcno and gcda files. 2013-11-20 04:15:05 +00:00
Transforms llvm-cov: Added file checksum to gcno and gcda files. 2013-11-20 04:15:05 +00:00
Unit
Verifier
YAMLParser
.clang-format Add .clang-format without column limit to subdirectory tests/. 2013-11-19 04:26:05 +00:00
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh