LLVM backend for 6502
Go to file
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
autoconf Update to reflect the next release. 2013-11-20 10:10:50 +00:00
bindings python: Fix check for disasm creation failure 2013-11-17 15:40:57 +00:00
cmake Revert my CMake patches concerning building with /MT (r194589, r194596) 2013-11-13 20:29:10 +00:00
docs YAML I/O add support for validate() 2013-11-21 00:28:07 +00:00
examples [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables. 2013-11-19 03:08:35 +00:00
include Teach ISel not to optimize 'optnone' functions. 2013-11-21 06:33:32 +00:00
lib The basic problem is that some mainstream programs cannot deal with the way 2013-11-21 07:04:30 +00:00
projects Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
test The basic problem is that some mainstream programs cannot deal with the way 2013-11-21 07:04:30 +00:00
tools [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables. 2013-11-19 03:08:35 +00:00
unittests [PM] Add a module analysis pass proxy for the function analysis manager. 2013-11-21 02:11:31 +00:00
utils FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565 2013-11-20 13:25:05 +00:00
.arcconfig Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool. 2012-12-01 12:07:58 +00:00
.clang-format Add a clang-format file so that the tool can automatically detect the 2013-09-02 07:19:04 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt llvm/CMakeLists.txt: Update LLVM_VERSION_MINOR to 5. 2013-11-20 13:11:48 +00:00
CODE_OWNERS.TXT Add loop rerolling code owner 2013-11-20 20:54:33 +00:00
configure Update to reflect the next release. 2013-11-20 10:10:50 +00:00
CREDITS.TXT Update CREDITS 2013-11-17 11:44:36 +00:00
LICENSE.TXT Be more specific and capitalize filenames. 2013-05-21 21:22:34 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile.common Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables . 2012-12-07 01:43:23 +00:00
Makefile.config.in Add an autoconf option for turning on -gsplit-dwarf by default 2013-06-25 01:12:25 +00:00
Makefile.rules Teach the Makefile build system how to handle SOURCES which include 2013-11-14 23:51:29 +00:00
README.txt Revert "Test commit to check e-mail address. Please discard this." 2013-10-04 10:59:13 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.