Re: [PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Jakub Jelinek
On Wed, Jan 03, 2018 at 02:07:36PM +0100, Martin Liška wrote: > 2018-01-03 Martin Liska > > PR tree-optimization/83593 > * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Clean-up > EH gimple statements. > (strlen_dom_walker::before_dom_children): Call > gimple

Re: [PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Martin Liška
to propagate that in strlen_dom_walker::m_cleanup_cfg. I've just triggered tests. Ready to install after it finishes? >From 217982bae6969865051f12798e4da444dd4aaa3f Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 3 Jan 2018 12:15:40 +0100 Subject: [PATCH] Clean-up EH after strlen transform

Re: [PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Martin Liška
On 01/03/2018 01:49 PM, Marc Glisse wrote: > On Wed, 3 Jan 2018, Martin Liška wrote: > > +    *cleanup_eh = maybe_clean_or_replace_eh_stmt (stmt, > +  stmt); > > Do you mean *cleanup_eh |= ... ? > Yes. Thanks!

Re: [PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Jakub Jelinek
On Wed, Jan 03, 2018 at 01:27:01PM +0100, Martin Liška wrote: > /* Reading the final '\0' character. */ > tree zero = build_int_cst (TREE_TYPE (lhs), 0); > gimple_set_vuse (stmt, NULL_TREE); > gimple_assign_set

Re: [PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Marc Glisse
On Wed, 3 Jan 2018, Martin Liška wrote: + *cleanup_eh = maybe_clean_or_replace_eh_stmt (stmt, + stmt); Do you mean *cleanup_eh |= ... ? -- Marc Glisse

[PATCH] Clean-up EH after strlen transformation (PR tree-optimization/83593).

2018-01-03 Thread Martin Liška
Hi. Strlen pass does following transformation: Optimizing: _7 = *ju_5(D); into: _7 = 0; which leads to need of removal of EH for the gimple statement. That's done via maybe_clean_or_replace_eh_stmt and then we need to call gimple_purge_dead_eh_edges. Last question I have is whether it's also n