LLVM backend for 6502
Go to file
Jakob Stoklund Olesen 43cda021d9 Fix inline cost predictions with SCIENCE.
After running a batch of measurements, it is clear that the inliner metrics
need some adjustments:

Own argument bonus:       20 -> 5
Outgoing argument penalty: 0 -> 5
Alloca bonus:             10 -> 5
Constant instr bonus:      7 -> 5
Dead successor bonus:     40 -> 5*(avg instrs/block)

The new cost metrics are generaly 25 points higher than before, so we may need
to move thresholds.

With this change, InlineConstants::CallPenalty becomes a political correction:

if (!isa<IntrinsicInst>(II) && !callIsSmall(CS.getCalledFunction()))
  NumInsts += InlineConstants::CallPenalty + CS.arg_size();

The code size is accurately modelled by CS.arg_size(). CallPenalty is added
because calls tend to take a long time, so it may not be worth it to inline a
function with lots of calls.

All of the political corrections are in the InlineConstants namespace:
IndirectCallBonus, CallPenalty, LastCallToStaticBonus, ColdccPenalty,
NoreturnPenalty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:21:56 +00:00
autoconf
bindings
cmake
docs
examples
include Fix inline cost predictions with SCIENCE. 2010-01-26 23:21:56 +00:00
lib Fix inline cost predictions with SCIENCE. 2010-01-26 23:21:56 +00:00
projects
runtime
test emit jump table an alias ".set" directives through MCStreamer as 2010-01-26 21:53:08 +00:00
tools
unittests
utils
website
Xcode
build-for-llvm-top.sh
CMakeLists.txt
configure
CREDITS.TXT
LICENSE.TXT 2010 is upon us. 2010-01-09 18:40:31 +00:00
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
ModuleInfo.txt
README.txt test commit. 2010-01-26 19:45:17 +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.