Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Richard Biener
On March 26, 2015 6:01:21 PM GMT+01:00, Jan Hubicka wrote: >Hi, >this is updated patch I am testing (along with the fixes to verifiew >and >inliner I will commit independently). OK. Thanks, Richard. > * passes.def: Add pass_nothrow. > * ipa-pure-const.c: (pass_data_nothrow): New. >

Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Jan Hubicka
Hi, this is updated patch I am testing (along with the fixes to verifiew and inliner I will commit independently). * passes.def: Add pass_nothrow. * ipa-pure-const.c: (pass_data_nothrow): New. (pass_nothrow): New. (pass_nothrow::execute): New. (make_pass_not

Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Jan Hubicka
> >> > >> So please re-check with the above execute_fixup_cfg removed > >> (your simple patch doesn't handle direct recursion optimistically). > > > >Ah, you are right. I will add it - that is easy enoug to check. > > But then you need to do the fixup or remember the direct recursion sites and >

Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Richard Biener
On March 26, 2015 3:41:12 PM GMT+01:00, Jan Hubicka wrote: >> >> Does that work on callgraph cycles? > >Yes. Because ... >> > + >> > + node->set_nothrow_flag (true); >> > + if (dump_file) >> > +fprintf (dump_file, "Function found to be nothrow: %s\n", >> > + current_function_name ());

Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Jan Hubicka
> > Does that work on callgraph cycles? Yes. Because ... > > + > > + node->set_nothrow_flag (true); > > + if (dump_file) > > +fprintf (dump_file, "Function found to be nothrow: %s\n", > > +current_function_name ()); > > + return execute_fixup_cfg (); > > Err - this doesn't make se

Re: Discover nothorow functions before into_ssa

2015-03-26 Thread Richard Biener
On Thu, 26 Mar 2015, Jan Hubicka wrote: > Hi, > this patch (as suggested by Richard) adds very simple discovery of > DECL_NOTHORW to build_ssa passes. > > The reason is that in 4.9 we did build_ssa in parallel with early optimization > that does nothrow discovery as part of local pure const. Bou