Hi,

On Tue, Oct 08 2019, Andre Vieira (lists) wrote:
> Hi,
>
> This patch adds a new target hook called 
> TARGET_HOOK_SANITIZE_CLONE_ATTRIBUTES.  This hook is meant to give each 
> target the ability to sanitize a cloned's declaration attribute list.
>
>
> Is this OK for trunk?
>
> Cheers,
> Andre
>
> gcc/ChangeLog:
>
> 2019-10-08  Andre Vieira  <andre.simoesdiasvie...@arm.com>
>
>       * ipa-cp.c(create_specialized_node): Call new target hook when
>          creating a new node.

I'm quite sure you don't want to call the hook here but from within
cgraph_node::create_virtual_clone (and perhaps also
cgraph_node::create_version_clone_with_body?), if only now there are two
passes creating clones and there may easily be more in the future.

Thanks,

Martin

>          * target.def(sanitize_clone_attributes): New target hook.
>          * targhooks.c(default_sanitize_clone_attributes): New.
>          * targhooks.h(default_sanitize_clone_attributes): New.
>          * doc/tm.texi.in: Document new target hook.
>          * doc/tm.texi: Regenerated

Reply via email to