summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-05-16 20:51:02 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2013-11-21 15:42:53 +0100
commit96db538cfbdcec3537814767fb3d3d338820daa0 (patch)
tree5eca3aea79828f29ee957d14753d08ed8020bc61
parenta8124da98a5b9f5d7e7d3f28b28f51ecbdb08992 (diff)
tweak inline heuristic a bitmatze_inlining
-rw-r--r--ir/opt/opt_inline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/opt/opt_inline.c b/ir/opt/opt_inline.c
index f639eac..e3273c5 100644
--- a/ir/opt/opt_inline.c
+++ b/ir/opt/opt_inline.c
@@ -713,7 +713,7 @@ enum inline_weights {
recursive_call_weight = 0, /**< Will be subtracted if the call is recursive. */
leaf_function_weight = 800, /**< Addend, if the function is a leaf. */
one_block_function_weight = 50, /**< Will be added, if the function consists of one block. */
- block_function_weight = -4, /**< Factor for the number of blocks. */
+ block_function_weight = 0, /**< Factor for the number of blocks. */
small_function_weight = 1000, /**< Addend for a small function. */
inner_loop_weight = 1000, /**< Will be multiplied with the loop depth, then added. */
large_function_weight = -3, /**< Will be multiplied with the number of nodes. */
@@ -963,7 +963,7 @@ static int calc_call_dynamic_benefice(call_env_t *cenv)
/* Give a bonus for small non-recursive functions:
* we want them to be inlined in almost every case */
- if (called_env->n_nodes < 30 && !called_env->recursive)
+ if (called_env->n_nodes < 30)
weight += small_function_weight;
/* Give a penalty for the called graph size */