Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Richard Biener
On Wed, Sep 18, 2024 at 8:41 PM Andrew Carlotti wrote: > > On Thu, Sep 19, 2024 at 01:01:39AM +0800, Yangyu Chen wrote: > > > > > > > On Sep 18, 2024, at 23:36, Andrew Carlotti > > > wrote: > > > > > > On Wed, Sep 18, 2024 at 09:46:15AM +0100, Richard Sandiford wrote: > > >> Yangyu Chen writes:

Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Andrew Carlotti
On Thu, Sep 19, 2024 at 01:01:39AM +0800, Yangyu Chen wrote: > > > > On Sep 18, 2024, at 23:36, Andrew Carlotti wrote: > > > > On Wed, Sep 18, 2024 at 09:46:15AM +0100, Richard Sandiford wrote: > >> Yangyu Chen writes: > >>> I recently found that target_clones functions cannot inline even when

Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Yangyu Chen
> On Sep 18, 2024, at 23:36, Andrew Carlotti wrote: > > On Wed, Sep 18, 2024 at 09:46:15AM +0100, Richard Sandiford wrote: >> Yangyu Chen writes: >>> I recently found that target_clones functions cannot inline even when >>> the caller has exactly the same target. However, if we only use targe

Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Andrew Carlotti
On Wed, Sep 18, 2024 at 09:46:15AM +0100, Richard Sandiford wrote: > Yangyu Chen writes: > > I recently found that target_clones functions cannot inline even when > > the caller has exactly the same target. However, if we only use target > > attributes in C++ and let the compiler generate IFUNC fo

Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Yangyu Chen
> On Sep 18, 2024, at 16:46, Richard Sandiford > wrote: > > Yangyu Chen writes: >> I recently found that target_clones functions cannot inline even when >> the caller has exactly the same target. However, if we only use target >> attributes in C++ and let the compiler generate IFUNC for us,

Re: [RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-18 Thread Richard Sandiford
Yangyu Chen writes: > I recently found that target_clones functions cannot inline even when > the caller has exactly the same target. However, if we only use target > attributes in C++ and let the compiler generate IFUNC for us, the > functions with the same target will be inlined. > > For example

[RFC PATCH] Allow functions with target_clones attribute to be inlined

2024-09-14 Thread Yangyu Chen
I recently found that target_clones functions cannot inline even when the caller has exactly the same target. However, if we only use target attributes in C++ and let the compiler generate IFUNC for us, the functions with the same target will be inlined. For example, the following code compiled on