Commit 4c967131 authored by Michael Beck's avatar Michael Beck
Browse files

calculate benefice on real callee

[r19130]
parent 0dd4bb60
......@@ -1753,6 +1753,10 @@ void inline_functions(int inline_threshold) {
call = entry->call;
callee = entry->callee;
/* calculate the benifice on the original call to prevent excessive inlining */
benefice = calc_inline_benefice(call, callee);
DB((dbg, SET_LEVEL_2, "In %+F Call %+F has benefice %d\n", current_ir_graph, callee, benefice));
e = pmap_find(copied_graphs, callee);
if (e != NULL) {
/*
......@@ -1762,10 +1766,7 @@ void inline_functions(int inline_threshold) {
callee = e->value;
}
benefice = calc_inline_benefice(call, callee);
DB((dbg, SET_LEVEL_2, "In %+F Call %+F has benefice %d\n", current_ir_graph, callee, benefice));
if (benefice > inline_threshold ||
if (benefice > -inline_threshold ||
(get_irg_inline_property(callee) >= irg_inline_forced)) {
if (current_ir_graph == callee) {
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment