Thought on inlining indirect function calls

2020-03-14 Thread FRÉDÉRIC RECOULES
Hello the GCC community, I just want to share some thoughts on inlining a function even if it is called through a function pointer. My starting point is the version 9.2 (used at https://godbolt.org/), so I am sorry if something similar have already been discussed since. For the context, I got ver

Re: Thought on inlining indirect function calls

2020-03-14 Thread Richard Biener via Gcc
On March 14, 2020 10:55:09 AM GMT+01:00, "FRÉDÉRIC RECOULES" wrote: >Hello the GCC community, >I just want to share some thoughts on inlining a function even if >it is called through a function pointer. >My starting point is the version 9.2 (used at https://godbolt.org/), >so I am sorry if someth

Re: Thought on inlining indirect function calls

2020-03-14 Thread FRÉDÉRIC RECOULES
"FRÉDÉRIC RECOULES" Envoyé: Samedi 14 Mars 2020 12:12:15 Objet: Re: Thought on inlining indirect function calls On March 14, 2020 10:55:09 AM GMT+01:00, "FRÉDÉRIC RECOULES" wrote: >Hello the GCC community, >I just want to share some thoughts on inlining a function even

Re: Thought on inlining indirect function calls

2020-03-14 Thread Jan Hubicka
> >I was pretty disappointed to see that even if the compiler knows we are > >calling f_add, it doesn't inline the call (it ends up with "call > >f_add"). > > It's probably because we know it's only called once and thus not performance > relevant. Try put it into a loop. I think it is because d

Re: Thought on inlining indirect function calls

2020-03-14 Thread FRÉDÉRIC RECOULES
not supported, it is? Frédéric Recoules - Mail original - De: "Jan Hubicka" À: "Richard Biener" Cc: "gcc" , "FRÉDÉRIC RECOULES" , mjam...@suse.cz Envoyé: Samedi 14 Mars 2020 14:05:07 Objet: Re: Thought on inlining indirect function calls

Re: Thought on inlining indirect function calls

2020-03-14 Thread Jan Hubicka
: "gcc" , "FRÉDÉRIC RECOULES" > , mjam...@suse.cz > Envoyé: Samedi 14 Mars 2020 14:05:07 > Objet: Re: Thought on inlining indirect function calls > > > >I was pretty disappointed to see that even if the compiler knows we are > > >calling

Re: Thought on inlining indirect function calls

2020-03-14 Thread FRÉDÉRIC RECOULES
RECOULES" Cc: "Richard Biener" , "gcc" , "mjambor" Envoyé: Samedi 14 Mars 2020 18:34:38 Objet: Re: Thought on inlining indirect function calls > > I think it is because during early opts we do not know if f is not > > modified by atoi call and at IPA ti