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
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
>It's probably because we know it's only called once and thus not performance
>relevant. Try put it into a loop.
Thanks for the hint, but I'm afraid it is not that. I tried this and it still
calls f_add. I also try with i = 1[...]000.
#include
#include
#include
int main (int argc, char *arg
> >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
> I think it is because during early opts we do not know if f is not
> modified by atoi call and at IPA time (where we already know that from
> resolution info) we do not have jump functions to track global variables.
I confirm that if I remove the calls to atoi, the function is correctly inline
Una duda ¿Usted conoce o tiene cuenta de Netflix, HBO o Amazon Prime?
Ahora usted imagine una plataforma igual, pero con cientos de cursos y
conferencias profesionales impartidas por expertos en todas las áreas. Eso es
exactamente lo que vengo a ofrecerle, una suscripción a nuestra nueva
plata
> > I think it is because during early opts we do not know if f is not
> > modified by atoi call and at IPA time (where we already know that from
> > resolution info) we do not have jump functions to track global variables.
>
> I confirm that if I remove the calls to atoi, the function is correc
> The problem here is that compiler thinks that atoi may call back some
> static function in unit that may change value of the variable. There is
> no analysis implemented on how such calls back to unit can affect the
> value. We have leaf attribute that you can annotate atoi (but glibc
> does no
Snapshot gcc-9-20200314 is now available on
https://gcc.gnu.org/pub/gcc/snapshots/9-20200314/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 9 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch
اطلاعیه وزارت تعاون، کار و رفاه
اجتماعی
اعـزام نیروی کـــار به کشور
آلـمـــان
درباره ما
http://tracking.euroassist.ir/tracking/click?d=Jt1sKUVGx9BxkcDL7uSe5auqRyyJvu7xusSsc_eV63QD19Mjnp_chVg1AtgSxeCb0sNyY7I56pdPn0UMPlCph0YsVa03e1NUPpFYH0qWtteFmc3o3OmrBFnljgQI9l7Sr89bQar8t-iXuskZRZB2o00q58je
10 matches
Mail list logo