Re: [trans-mem] cgraph edges vs function cloning

2009-07-29 Thread Richard Henderson
On 07/29/2009 12:28 AM, Martin Jambor wrote: That is not really true. Whee. I guess I really didn't understand what was going on. At present I'm testing the following minimal patch to fix the double lookup problem I mentioned. It's uglier than it ought to be because of incorrect indentation

Re: [trans-mem] cgraph edges vs function cloning

2009-07-29 Thread Martin Jambor
Hi, On Tue, Jul 28, 2009 at 04:26:12PM -0700, Richard Henderson wrote: > On 07/28/2009 10:44 AM, Richard Henderson wrote: > >I guess I'll poke at cleaning this up today. I've got to > >familiarize myself with how virtual clones work... > > The virtual clones that ipa-cp makes seems to be easy. >

Re: [trans-mem] cgraph edges vs function cloning

2009-07-28 Thread Jan Hubicka
> On 07/28/2009 10:44 AM, Richard Henderson wrote: > >I guess I'll poke at cleaning this up today. I've got to > >familiarize myself with how virtual clones work... > > The virtual clones that ipa-cp makes seems to be easy. > > My thought here is that since (virtual) clones don't > have actual bo

Re: [trans-mem] cgraph edges vs function cloning

2009-07-28 Thread Richard Henderson
On 07/28/2009 10:44 AM, Richard Henderson wrote: I guess I'll poke at cleaning this up today. I've got to familiarize myself with how virtual clones work... The virtual clones that ipa-cp makes seems to be easy. My thought here is that since (virtual) clones don't have actual bodies (and when

Re: [trans-mem] cgraph edges vs function cloning

2009-07-28 Thread Richard Henderson
On 07/28/2009 10:16 AM, Jan Hubicka wrote: There is code in cgraph_copy_node_for_versioning that redirect callers in the list to new location. Since clonning might render some code unreachable and remove edges, this can lead to ICE. But since this was formely invented for IPA-CP, that is now us

Re: [trans-mem] cgraph edges vs function cloning

2009-07-28 Thread Jan Hubicka
> > struct cgraph_edge *edge = cgraph_edge (id->src_node, > > orig_stmt); > POINT_A > > int flags; > > > > switch (id->transform_call_graph_edges) > >{ > > case CB_CGE_DUPLICATE: > >if (edge) > >

Re: [trans-mem] cgraph edges vs function cloning

2009-07-27 Thread Richard Henderson
struct cgraph_edge *edge = cgraph_edge (id->src_node, orig_stmt); POINT_A int flags; switch (id->transform_call_graph_edges) { case CB_CGE_DUPLICATE: if (edge) cgraph_clone_edge (edge, id->

Re: [trans-mem] cgraph edges vs function cloning

2009-07-23 Thread Richard Henderson
On 07/23/2009 10:28 AM, Jan Hubicka wrote: When you are not copying the whole function body, you will need to remove those edges that are outside region being duplicated, perhaps that is the problem? Nope, I'm copying the whole body and adjusting it afterward. r~

Re: [trans-mem] cgraph edges vs function cloning

2009-07-23 Thread Jan Hubicka
> Could I convince you to have a look at the transactional-memory branch > test libitm/testsuite/libitm.c++/eh-1.C? I'm getting > > z.c:36:1: error: edge void f1()->void* __cxa_allocate_exception(long > unsigned int) has no corresponding call_stmt > D.2114_4 = __cxa_allocate_exception (4); > >