> > Bootstrapped/regtested x86_64-linux and also lto-bootstrapped with > > release checking. I plan to commit it after bit more testing. > > > > Honza > > > > gcc/ChangeLog: > > > > 2020-10-22 Jan Hubicka <hubi...@ucw.cz> > > > > * cgraph.c (cgraph_node::get_untransformed_body): Perform lazy > > clone materialization. > > * cgraph.h (cgraph_node::materialize_clone): Declare. > > (symbol_table::materialize_all_clones): Remove. > > * cgraphclones.c (cgraph_materialize_clone): Turn to ... > > (cgraph_node::materialize_clone): .. this one; move here > > dumping from symbol_table::materialize_all_clones. > > (symbol_table::materialize_all_clones): Remove. > > * cgraphunit.c (mark_functions_to_output): Clear stmt references. > > (cgraph_node::expand): Initialize bitmaps early; > > do not call execute_all_ipa_transforms if there are no transforms. > > * ipa-inline-transform.c (save_inline_function_body): Fix formating. > > (inline_transform): Materialize all clones before function is modified. > > * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): > > Materialize clone if needed. > > * ipa.c (class pass_materialize_all_clones): Remove. > > (make_pass_materialize_all_clones): Remove. > > * passes.c (execute_all_ipa_transforms): Materialize all clones. > > * passes.def: Remove pass_materialize_all_clones. > > * tree-pass.h (make_pass_materialize_all_clones): Remove. > > > > [...] > > > diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c > > index 05713c28cf0..1e2262789dd 100644 > > --- a/gcc/cgraphunit.c > > +++ b/gcc/cgraphunit.c > > @@ -2298,7 +2299,8 @@ cgraph_node::expand (void) > > bitmap_obstack_initialize (®_obstack); /* FIXME, only at RTL > > generation*/ > > > > update_ssa (TODO_update_ssa_only_virtuals); > > - execute_all_ipa_transforms (false); > > + if (ipa_transforms_to_apply.exists ()) > > + execute_all_ipa_transforms (false); > > > > Can some function not have ipa_inline among the transforms_to_apply?
This is for the case of repeated execution. If you do get_body earlier transforms are already applied. Honza > > Martin