Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-15 Thread Jan Hubicka
> Hi, > > I have changed the name to make the target hook more general and not create > the illusion it is related to sanitizers. > > Is this OK for trunk? Can't you just go via IPA symbol summary or add_cgraph_duplication_hook? Honza

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-15 Thread Andre Vieira (lists)
Hi, I have changed the name to make the target hook more general and not create the illusion it is related to sanitizers. Is this OK for trunk? Cheers, Andre gcc/ChangeLog: 2019-10-15 Andre Vieira * cgraphclones.c(create_clone): Call new target hook when creating a new

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-09 Thread Andre Vieira (lists)
Adding Jakub to CC' On 09/10/2019 16:29, Andre Vieira (lists) wrote: Hi Martin, I see thank you. For my particular use case I only need to strip attributes for local symbols.  However, if I were to claim it is only used for non-externally visible clones than I would also need to make sure

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-09 Thread Andre Vieira (lists)
Hi Martin, I see thank you. For my particular use case I only need to strip attributes for local symbols. However, if I were to claim it is only used for non-externally visible clones than I would also need to make sure they are non-externally visible now and put something in place that

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-09 Thread Martin Jambor
Hi, On Wed, Oct 09 2019, Andre Vieira (lists) wrote: > Hi Martin, > > Thanks for the suggestion. I have moved the target hook to the > following functions: > 'create_clone' > 'create_version_clone' I am not sure that calling the hook in create_version_clone is what you want. It should perhaps

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-09 Thread Andre Vieira (lists)
Hi Martin, Thanks for the suggestion. I have moved the target hook to the following functions: 'create_clone' 'create_version_clone' 'create_version_clone_with_body' I looked for all 'cgraph_node::create_*' functions and added the target hook to them. The exception is 'create_virtual_clone'

Re: [Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-08 Thread Martin Jambor
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, >

[Patch 1/2][ipa] Add target hook to sanitize cloned declaration's attributes

2019-10-08 Thread Andre Vieira (lists)
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 *