On Wed, Jan 15, 2020 at 3:48 PM Martin Liška <mli...@suse.cz> wrote:
>
> On 1/15/20 12:48 PM, Martin Liška wrote:
> > On 1/15/20 12:08 PM, Richard Biener wrote:
> >> On Wed, Jan 15, 2020 at 10:57 AM Martin Liška <mli...@suse.cz> wrote:
> >>>
> >>> Hi.
> >>>
> >>> The patch is about caching of outer non-CLEANUP region
> >>> for a leh_state. It's a spin off the
> >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93199#c19,
> >>> now it's not using a hash_map, but a cached value in leh_state.
> >>>
> >>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>>
> >>> Ready to be installed?
> >>
> >> +
> >> +  eh_region reg = state->cur_region;
> >
> > Huh, stupid mistake.
> >
> >>
> >> shouldn't that be reg = state->outer_non_cleanup?
> >>
> >> -  if (using_eh_for_cleanups_p () && !cleanup_is_dead_in 
> >> (state->cur_region))
> >> +  if (using_eh_for_cleanups_p () && !cleanup_is_dead_in (state))
> >>       {
> >>         this_tf.region = gen_eh_region_cleanup (state->cur_region);
> >>         this_state.cur_region = this_tf.region;
> >> +      this_state.outer_non_cleanup = state->outer_non_cleanup;
> >>       }
> >>     else
> >>       {
> >>         this_tf.region = NULL;
> >>         this_state.cur_region = state->cur_region;
> >> +      this_state.outer_non_cleanup = this_state.cur_region;
> >>
> >> why can't we copy state->outer_non_cleanup here?
> >
> > We can, I'm re-testing that patch.
> >
> > Martin
> >
> >>
> >>       }
> >>
> >>
> >>> Thanks,
> >>> Martin
> >>>
> >>> gcc/ChangeLog:
> >>>
> >>> 2020-01-14  Martin Liska  <mli...@suse.cz>
> >>>
> >>>          PR tree-optimization/93199
> >>>          * tree-eh.c (struct leh_state): Add
> >>>          new field outer_non_cleanup.
> >>>          (cleanup_is_dead_in): Pass leh_state instead
> >>>          of eh_region.  Add a checking that state->outer_non_cleanup
> >>>          points to outer non-clean up region.
> >>>          (lower_try_finally): Record outer_non_cleanup
> >>>          for this_state.
> >>>          (lower_catch): Likewise.
> >>>          (lower_eh_filter): Likewise.
> >>>          (lower_eh_must_not_throw): Likewise.
> >>>          (lower_cleanup): Likewise.
> >>> ---
> >>>    gcc/tree-eh.c | 31 +++++++++++++++++++++++++------
> >>>    1 file changed, 25 insertions(+), 6 deletions(-)
> >>>
> >>>
> >
>
> There's a tested version.
>
> Ready to be installed?

OK.
Thanks,
Richard.

> Thanks,
> Martin

Reply via email to