llvm-6502/test
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
..
Analysis Stay rational; don't assert trying to take the square root of a negative value. 2012-08-01 09:14:36 +00:00
Archive
Assembler
Bindings/Ocaml
Bitcode More replacing of target-dependent intrinsics with target-indepdent 2012-07-18 00:02:16 +00:00
BugPoint
CodeGen Add a much more conservative strategy for aligning branch targets. 2012-08-07 09:45:24 +00:00
DebugInfo Temporarily revert c23b933d5f. It's causing 2012-08-01 18:19:01 +00:00
ExecutionEngine
Feature
Instrumentation revert r160742: it's breaking CMake build 2012-07-25 18:49:28 +00:00
Integer
Linker
MC The define for 64 bit sign extension neglected to 2012-08-07 00:35:22 +00:00
Object Move test yaml files under Inputs until they are converted to be the actual 2012-08-02 21:52:49 +00:00
Other
Scripts
TableGen
Transforms PR13095: Give an inline cost bonus to functions using byval arguments. 2012-08-07 11:13:19 +00:00
Unit
Verifier Fix a typo (the the => the) 2012-07-23 08:51:15 +00:00
YAMLParser
CMakeLists.txt [CMake] Add yaml2obj to check-llvm. 2012-08-03 00:45:32 +00:00
lit.cfg
lit.site.cfg.in
Makefile fix 'make check' when ocamlopt returns the compiler path with CFLAGS (and there's a cflag with a = char) 2012-08-01 15:50:34 +00:00
Makefile.tests
TestRunner.sh