+2018-11-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/88030
+ * tree-complex.c (need_eh_cleanup): New global.
+ (update_complex_assignment): Mark blocks that need EH update.
+ (expand_complex_comparison): Likewise.
+ (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
+ perform EH cleanup and schedule CFG cleanup if that did anything.
+
2018-11-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88018
non-SSA_NAME/non-invariant args that need to be replaced by SSA_NAMEs. */
static vec<gphi *> phis_to_revisit;
+/* BBs that need EH cleanup. */
+static bitmap need_eh_cleanup;
+
/* Lookup UID in the complex_variable_components hashtable and return the
associated tree. */
static tree
stmt = gsi_stmt (*gsi);
update_stmt (stmt);
if (maybe_clean_eh_stmt (stmt))
- gimple_purge_dead_eh_edges (gimple_bb (stmt));
+ bitmap_set_bit (need_eh_cleanup, gimple_bb (stmt)->index);
update_complex_components (gsi, gsi_stmt (*gsi), r, i);
}
update_stmt (stmt);
if (maybe_clean_eh_stmt (stmt))
- gimple_purge_dead_eh_edges (gimple_bb (stmt));
+ bitmap_set_bit (need_eh_cleanup, gimple_bb (stmt)->index);
}
/* Expand inline asm that sets some complex SSA_NAMEs. */
class complex_propagate complex_propagate;
complex_propagate.ssa_propagate ();
+ need_eh_cleanup = BITMAP_ALLOC (NULL);
+
complex_variable_components = new int_tree_htab_type (10);
complex_ssa_name_components.create (2 * num_ssa_names);
gsi_commit_edge_inserts ();
+ unsigned todo
+ = gimple_purge_all_dead_eh_edges (need_eh_cleanup) ? TODO_cleanup_cfg : 0;
+ BITMAP_FREE (need_eh_cleanup);
+
delete complex_variable_components;
complex_variable_components = NULL;
complex_ssa_name_components.release ();
complex_lattice_values.release ();
- return 0;
+ return todo;
}
namespace {