This is the mail archive of the gcc-patches@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: [tree-profiling-branch PATCH] Function cloning + IPCP extension


> > It should not be too dificult - there are very few places in the code
> > that actually needs to worry about the decs themselves.  Only reason why
> > they do so is that they use the decl hashtable to look up beggining of
> > the list of clones that can be easilly avoided by using the orig
> > pointer.  I used the hashtable just to conserve memory until there is
> > real need to add extra pointers around.
> 
> 
> We preferred mapping  the versioned nodes with a distinct hash code since 
> they
> have  their own decl and body (with the exception that they still share 
> the same
> statics with the original function). 
> This also seems reasonable due to the fact that the versioned functions 
> could 
> also be inlined and therefore would have their own inlining clones list.
> Do you think that the inline clones of the original node and inline clones 
> of 
> the versioned node should share the same list ? 

Yes, it seems resonable to me.
Actually I would like the code to be organized in a way so the optimizer
just create the clone nodes containing description how to produce the
body from original and body to be produced once the function is
compiled.  Then the later clones created by the inliner will be both
inlined and constant propagated at a time.
The reason for this is to separate local and global data access, so the
local pass can be done before storing program to disc while global
propagation don't need to access all the datastructures for real IPA.

I will try to look into it deeper tomorrow (I have to read your code
more curefully too)

Honza
> 
> Thanks, 
> Revital and Razya


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