This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Interprocedural optimization question
- From: Razya Ladelsky <RAZYA at il dot ibm dot com>
- To: rbertran at ac dot upc dot edu, gcc at gcc dot gnu dot org
- Date: Mon, 29 Jan 2007 13:50:31 +0200
- Subject: RE: Interprocedural optimization question
Razya Ladelsky/Haifa/IBM wrote on 29/01/2007 13:46:33:
> Hi,
>
> Does gcc apply inter-procedural optimizations across functions called
using
> a function pointer? I guess that gcc performs conservatively assuming
that
> the pointer could point everywhere because the pointer is a declared as
a
> global variable and could be changed in any place. Is it true?
Yes.
The callgraph does not include these calls.
> In this case, is there any pragma or directive to give a hint to the
> compiler, giving the set of possible values of the pointer (which in my
> case is known by the developer)? If not, this could be useful for
> optimization purposes.
>
> thanks in advance,
>
> Salut!
>
> Ramon.
>
>
> --
>
-------------------------------------------------------------------------------
> Ramon Bertran Monfort Departament d'Arquitectura de
> Computadors
> Telefon (+34) 93 4054033/54055 Universitat Politecnica
> de Catalunya
> Fax (+34) 93 4017055 Despatx C6-103/C6-221-9
> Campus Nord
> e-mail rbertran@ac.upc.edu C. Jordi Girona 1-3 -
> 08034 Barcelona
>
-------------------------------------------------------------------------------
>
> A hundred times every day, I remind myself that my inner and outer
> life depends
> on the labors of other men, living and dead, and that I must exert
myself in
> order to give in the measure as I have received and am still receiving.
>
> A. Einstein
>
> [attachment "atte7k4r.dat" deleted by Razya Ladelsky/Haifa/IBM]