/* associate the lowered type with the original one for easier access */
if(changed) {
- set_method_calling_convention(lowered,
- get_method_calling_convention(mtp) | cc_compound_ret);
+ set_method_calling_convention(lowered, get_method_calling_convention(mtp) | cc_compound_ret);
}
set_lowered_type(mtp, lowered);
pmap *dummy_map; /**< A map for finding the dummy arguments. */
unsigned dnr; /**< The dummy index number. */
const lower_params_t *params; /**< lowering parameters */
+ int changed; /**< set if the current graph was changed */
} wlk_env;
/**
if (pred == get_irg_args(current_ir_graph)) {
long pnr = get_Proj_proj(n);
set_Proj_proj(n, pnr + env->arg_shift);
+ env->changed = 1;
}
}
else if (op == op_Call) {
env.dummy_map = pmap_create_ex(8);
env.dnr = 0;
env.params = lp;
+ env.changed = 0;
/* scan the code, fix argument numbers and collect calls. */
irg_walk_graph(irg, firm_clear_link, fix_args_and_collect_calls, &env);
/* fix all calls */
- if (env.cl_list)
+ if (env.cl_list) {
fix_call_list(irg, &env);
+ env.changed = 1;
+ }
if (n_ret_com) {
/*
* Now fix the Return node of the current graph.
*/
+ env.changed = 1;
/* STEP 1: find the return. This is simple, we have normalized the graph. */
endbl = get_irg_end_block(irg);
pmap_destroy(env.dummy_map);
obstack_free(&env.obst, NULL);
- set_irg_outs_inconsistent(irg);
+ if (env.changed) {
+ /* invalidate the analysis info */
+ set_irg_outs_inconsistent(irg);
+ }
}
/**