Commit adccf2fb authored by Manuel Mohr's avatar Manuel Mohr
Browse files

Only compute global entity usage if alias analysis is enabled.

The global analysis has quadratic worst-case complexity in the number of
graphs.  At least if alias analysis is disabled anyway, this can be
avoided.
parent 63bcb1a3
......@@ -2171,7 +2171,11 @@ void optimize_load_store(ir_graph *irg)
assert(get_irg_pinned(irg) != op_pin_state_floats);
assure_irp_globals_entity_usage_computed();
const ir_disambiguator_options opts =
get_irg_memory_disambiguator_options(irg);
if ((opts & aa_opt_always_alias) == 0) {
assure_irp_globals_entity_usage_computed();
}
walk_env_t env;
obstack_init(&env.obst);
......
......@@ -1753,7 +1753,11 @@ void opt_ldst(ir_graph *irg)
| IR_GRAPH_PROPERTY_NO_UNREACHABLE_CODE
| IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE);
assure_irp_globals_entity_usage_computed();
const ir_disambiguator_options opts =
get_irg_memory_disambiguator_options(irg);
if ((opts & aa_opt_always_alias) == 0) {
assure_irp_globals_entity_usage_computed();
}
obstack_init(&env.obst);
ir_nodehashmap_init(&env.adr_map);
......
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