Commit d20c47fc by Bernd Schmidt Committed by Bernd Schmidt

* ira.c (ira): Update regstat data if we deleted insns.

From-SVN: r232556
parent e4729419
2016-01-19 Bernd Schmidt <bschmidt@redhat.com>
* ira.c (ira): Update regstat data if we deleted insns.
2016-01-19 Jakub Jelinek <jakub@redhat.com> 2016-01-19 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/68955 PR rtl-optimization/68955
...@@ -13,7 +17,7 @@ ...@@ -13,7 +17,7 @@
assume that the node has body. assume that the node has body.
* cgraph.c (cgraph_node::get_untransformed_body): Use gimple_body_p * cgraph.c (cgraph_node::get_untransformed_body): Use gimple_body_p
check. check.
2016-01-19 Jan Hubicka <hubicka@ucw.cz> 2016-01-19 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (lto_output): Do not stream instrumentation * lto-streamer-out.c (lto_output): Do not stream instrumentation
......
...@@ -5185,19 +5185,27 @@ ira (FILE *f) ...@@ -5185,19 +5185,27 @@ ira (FILE *f)
setup_reg_equiv (); setup_reg_equiv ();
setup_reg_equiv_init (); setup_reg_equiv_init ();
bool update_regstat = false;
if (optimize && rebuild_p) if (optimize && rebuild_p)
{ {
timevar_push (TV_JUMP); timevar_push (TV_JUMP);
rebuild_jump_labels (get_insns ()); rebuild_jump_labels (get_insns ());
if (purge_all_dead_edges ()) if (purge_all_dead_edges ())
delete_unreachable_blocks (); {
delete_unreachable_blocks ();
update_regstat = true;
}
timevar_pop (TV_JUMP); timevar_pop (TV_JUMP);
} }
allocated_reg_info_size = max_reg_num (); allocated_reg_info_size = max_reg_num ();
if (delete_trivially_dead_insns (get_insns (), max_reg_num ())) if (delete_trivially_dead_insns (get_insns (), max_reg_num ()))
df_analyze (); {
df_analyze ();
update_regstat = true;
}
/* It is not worth to do such improvement when we use a simple /* It is not worth to do such improvement when we use a simple
allocation because of -O0 usage or because the function is too allocation because of -O0 usage or because the function is too
...@@ -5308,7 +5316,7 @@ ira (FILE *f) ...@@ -5308,7 +5316,7 @@ ira (FILE *f)
check_allocation (); check_allocation ();
#endif #endif
if (max_regno != max_regno_before_ira) if (update_regstat || max_regno != max_regno_before_ira)
{ {
regstat_free_n_sets_and_refs (); regstat_free_n_sets_and_refs ();
regstat_free_ri (); regstat_free_ri ();
......
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