projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use ia32_copy_am_attrs() for splitting IMul reg, mem, imm and also reset base and...
[libfirm]
/
ir
/
opt
/
opt_inline.c
diff --git
a/ir/opt/opt_inline.c
b/ir/opt/opt_inline.c
index
00e6036
..
7f0998b
100644
(file)
--- a/
ir/opt/opt_inline.c
+++ b/
ir/opt/opt_inline.c
@@
-2022,8
+2022,7
@@
static ir_graph **create_irg_list(void) {
}
/**
}
/**
- * Push a call onto the priority list if its
- * benefice is big enough.
+ * Push a call onto the priority list if its benefice is big enough.
*
* @param pqueue the priority queue of calls
* @param call the call entry
*
* @param pqueue the priority queue of calls
* @param call the call entry
@@
-2037,11
+2036,12
@@
static void maybe_push_call(pqueue_t *pqueue, call_entry *call,
irg_inline_property prop = get_irg_inline_property(callee);
int benefice = calc_inline_benefice(call, callee);
irg_inline_property prop = get_irg_inline_property(callee);
int benefice = calc_inline_benefice(call, callee);
-
DB((dbg, LEVEL_2, "In %+F Call %+F to %+F has benefice %d\n",
-
get_irn_irg(call->call), call->call, callee, benefice));
+ DB((dbg, LEVEL_2, "In %+F Call %+F to %+F has benefice %d\n",
+ get_irn_irg(call->call), call->call, callee, benefice));
- if (
benefice < inline_threshold && prop < irg_inline_forced)
+ if (
prop < irg_inline_forced && benefice < inline_threshold) {
return;
return;
+ }
pqueue_put(pqueue, call, benefice);
}
pqueue_put(pqueue, call, benefice);
}
@@
-2274,22
+2274,18
@@
void inline_functions(unsigned maxsize, int inline_threshold) {
env = get_irg_link(irg);
if (env->got_inline) {
/* this irg got calls inlined: optimize it */
env = get_irg_link(irg);
if (env->got_inline) {
/* this irg got calls inlined: optimize it */
-
- if (0) {
- /* scalar replacement does not work well with Tuple nodes, so optimize them away */
- optimize_graph_df(irg);
-
+ if (get_opt_combo()) {
+ if (env->local_vars) {
+ scalar_replacement_opt(irg);
+ }
+ combo(irg);
+ } else {
if (env->local_vars) {
if (scalar_replacement_opt(irg)) {
optimize_graph_df(irg);
}
}
optimize_cf(irg);
if (env->local_vars) {
if (scalar_replacement_opt(irg)) {
optimize_graph_df(irg);
}
}
optimize_cf(irg);
- } else {
- if (env->local_vars) {
- scalar_replacement_opt(irg);
- }
- combo(irg);
}
}
if (env->got_inline || (env->n_callers_orig != env->n_callers)) {
}
}
if (env->got_inline || (env->n_callers_orig != env->n_callers)) {