LLVM backend for 6502
Go to file
Benjamin Kramer b6fdd022b7 PR13095: Give an inline cost bonus to functions using byval arguments.
We give a bonus for every argument because the argument setup is not needed
anymore when the function is inlined. With this patch we interpret byval
arguments as a compact representation of many arguments. The byval argument
setup is implemented in the backend as an inline memcpy, so to model the
cost as accurately as possible we take the number of pointer-sized elements
in the byval argument and give a bonus of 2 instructions for every one of
those. The bonus is capped at 8 elements, which is the number of stores
at which the x86 backend switches from an expanded inline memcpy to a real
memcpy. It would be better to use the real memcpy threshold from the backend,
but it's not available via TargetData.

This change brings the performance of c-ray in line with gcc 4.7. The included
test case tries to reproduce the c-ray problem to catch regressions for this
benchmark early, its performance is dominated by the inline decision of a
specific call.

This only has a small impact on most code, more on x86 and arm than on x86_64
due to the way the ABI works. When building LLVM for x86 it gives a small
inline cost boost to virtually any function using StringRef or STL allocators,
but only a 0.01% increase in overall binary size. The size of gcc compiled by
clang actually shrunk by a couple bytes with this patch applied, but not
significantly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161413 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07 11:13:19 +00:00
autoconf Add support for the OpenBSD for Bitrig. 2012-08-06 20:52:18 +00:00
bindings Remove tabs. 2012-07-19 00:23:13 +00:00
cmake [CMake] add_lit_target: Remove comments about add_dependencies. It is not a bug in cmake that add_custom_target(DEPENDS) would not accept targets but file-level dependencies. 2012-08-04 02:14:44 +00:00
docs Add yaml2obj. A utility to convert YAML to binaries. 2012-08-02 19:16:56 +00:00
examples Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h 2012-06-29 12:38:19 +00:00
include Revert r161371. Removing the 'const' before Type is a "good thing". 2012-08-07 05:51:59 +00:00
lib PR13095: Give an inline cost bonus to functions using byval arguments. 2012-08-07 11:13:19 +00:00
projects Fix a typo (the the => the) 2012-07-23 08:51:15 +00:00
runtime Free the allocated filename. Found by clang static analyzer. 2012-06-15 09:11:47 +00:00
test PR13095: Give an inline cost bonus to functions using byval arguments. 2012-08-07 11:13:19 +00:00
tools Reduce indentation by early exiting. 2012-08-06 22:52:45 +00:00
unittests Update cmake build. 2012-08-04 09:52:39 +00:00
utils Remove extraneous ';'. 2012-08-04 10:31:40 +00:00
.gitignore Add tools/lld to .gitignore. 2012-05-02 21:25:32 +00:00
CMakeLists.txt Add yaml2obj. A utility to convert YAML to binaries. 2012-08-02 19:16:56 +00:00
CODE_OWNERS.TXT Add the list of code owners to the top level of the LLVM source tree to 2012-07-26 08:04:09 +00:00
configure Add support for the OpenBSD for Bitrig. 2012-08-06 20:52:18 +00:00
CREDITS.TXT Alphabetize. 2012-06-19 23:47:58 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
llvm.spec.in
LLVMBuild.txt
Makefile Do not install llvm-config-host for cross-builds of clang. rdar://11317847 2012-05-09 00:07:02 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in Add a configure flag for enabling -Werror on the command line 2012-08-03 19:58:20 +00:00
Makefile.rules Add a configure flag for enabling -Werror on the command line 2012-08-03 19:58:20 +00:00
README.txt test commit 2012-07-11 17:34:12 +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 HTML documentation provided in docs/index.html for further
assistance with LLVM.

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