This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fold_builtin changes tree


On Mon, 19 Mar 2012 22:49:39 -0700, Ian Lance Taylor wrote:

> 
> I'm not sure what you are folding the builtin to, but perhaps you could
> retain a reference to the function.
> 

I am folding the function call __function_size(foobar) to a new symbol 
foobar@size. The reference to function foobar disappears. Can I keep a 
reference foobar attached to the symbol somehow?

> Or, you could write a tiny pass which set DECL_PRESERVED_P for each
> function passed to __function_size.
> 

Might do as a last resort.

> Or, perhaps you could handle it in expand_builtin rather than
> fold_builtin.
> 

I thought that the only way to replace a builtin expression was to use 
fold_builtin and expand_builtin had other purposes. How can I use the 
expand_builtin to do replacement?

Cheers,

Paulo Matos




-- 
PMatos


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]