Re: the interface for cloning function

2011-06-16 Thread Martin Jambor
Hi, On Wed, Jun 15, 2011 at 07:20:47PM +0200, Feng LI wrote: > Hi, > > Is there an interface provided in GCC to clone the current function? > I searched in the source code but failed, just in case I'm going wrong. > There are at least two. If you want to clone from within an ordinary intra-pro

Re: the interface for cloning function

2011-06-16 Thread Richard Henderson
On 06/15/2011 10:20 AM, Feng LI wrote: > Hi, > > Is there an interface provided in GCC to clone the current function? > I searched in the source code but failed, just in case I'm going wrong. Try cgraph_copy_node_for_versioning. It's not 100% generic atm; you may find that you have to make some

the interface for cloning function

2011-06-15 Thread Feng LI
Hi, Is there an interface provided in GCC to clone the current function? I searched in the source code but failed, just in case I'm going wrong. Thanks, Feng