[PATCH] New IPA-CP with real function cloning
Jan Hubicka
hubicka@ucw.cz
Thu Jul 14 16:19:00 GMT 2011
> > > if (dec < cs->count)
> > > cs->count -= dec;
> > > else
> > > cs->count = 0;
> > > }
> > >
> > > if (dump_file)
> > > dump_profile_updates (orig_node, new_node);
> > > }
> > >
> > > if (node->local.can_change_signature)
> > > {
> > > args_to_skip = BITMAP_GGC_ALLOC ();
> > > for (i = 0; i < count; i++)
> > > {
> > > tree t = VEC_index (tree, known_vals, i);
> > >
> > > if ((t && TREE_CODE (t) != TREE_BINFO)
> > > || !ipa_is_param_used (info, i))
> > > bitmap_set_bit (args_to_skip, i);
> > > }
> > > }
> > > else
> > > args_to_skip = NULL;
> > When we can't change signature, still we can set is_parm_unused flag for the callee
> > to aid later optimizers.
>
> I assume I can re-use the node->local.can_change_signature flag? Is
> that supposed to be set at any given place or can IPA-CP do it on its own?
can_change_signature is currently used by i386 backend and it is set by inliner.
I plan to move it to visibility pass at the time local functions are dentified.
So yes, you can assume it is set and up to date at the time IPA-CP is run.
Honza
>
> >
> > Rest of patch looks OK. It definitely reads better than previous ipa-cp.c ;)
> > I suppose we will need to get some experience with the logic deciding whether to clone..
>
>
> Thanks, I'll post the current version in a moment.
>
> Martin
More information about the Gcc-patches
mailing list