Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-07 Thread Richard Guenther
On Mon, Nov 7, 2011 at 8:01 PM, Richard Henderson wrote: > On 11/05/2011 03:09 PM, Richard Guenther wrote: >> On Sat, Nov 5, 2011 at 10:05 PM, Aldy Hernandez wrote: >>> [rth, see below] >>> >   local_define_builtin ("__builtin_eh_pointer", ftype, > BUILT_IN_EH_POINTER, >              

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-07 Thread Aldy Hernandez
I hope this cleanup both addresses the above questions and tidies things up as indicated. Please ask if you've got more questions. BTW, please add a merged changelog entry to ChangeLog.tm-merge. No need for a ChangeLog.tm, unless we don't merge, in case we're back to ChangeLog.tm for a com

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-07 Thread Richard Henderson
On 11/05/2011 03:09 PM, Richard Guenther wrote: > On Sat, Nov 5, 2011 at 10:05 PM, Aldy Hernandez wrote: >> [rth, see below] >> local_define_builtin ("__builtin_eh_pointer", ftype, BUILT_IN_EH_POINTER, "__builtin_eh_pointer", ECF_PURE | ECF_NOTHROW | EC

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-07 Thread Richard Henderson
On 11/06/2011 02:09 AM, Richard Guenther wrote: >> > Richi, do you have any particular issue with the attribs.c change? Does >> > this context resolve any questions you may have had? > ... no, it just looked weird without seeing a use. Now, target specific > attributes on a non-target specific bu

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-06 Thread Richard Guenther
On Sun, Nov 6, 2011 at 4:41 AM, Aldy Hernandez wrote: > >> Well - we usually don't grab bits off the tree nodes lightly.  Especially >> if >> the cgraph seems to be more fit. >> >>> If this is a suggestion, I can put it on my laundry list of future things >>> todo (after merge, 4.8?, etc). >> >> T

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-06 Thread Richard Guenther
On Sun, Nov 6, 2011 at 12:16 AM, Aldy Hernandez wrote: > [rth, see below] > >>> Index: gcc/attribs.c >>> === >>> --- gcc/attribs.c       (.../trunk)     (revision 180744) >>> +++ gcc/attribs.c       (.../branches/transactional-memory)

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Aldy Hernandez
Well - we usually don't grab bits off the tree nodes lightly. Especially if the cgraph seems to be more fit. If this is a suggestion, I can put it on my laundry list of future things todo (after merge, 4.8?, etc). There are not many consumers of the flag, so fixing it shouldn't be hard. For

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Aldy Hernandez
[rth, see below] Index: gcc/attribs.c === --- gcc/attribs.c (.../trunk) (revision 180744) +++ gcc/attribs.c (.../branches/transactional-memory) (revision 180773) @@ -166,7 +166,8 @@ init_attributes (void)

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Richard Guenther
On Sat, Nov 5, 2011 at 10:05 PM, Aldy Hernandez wrote: > [rth, see below] > >>>   local_define_builtin ("__builtin_eh_pointer", ftype, >>> BUILT_IN_EH_POINTER, >>>                        "__builtin_eh_pointer", ECF_PURE | ECF_NOTHROW | >>> ECF_LEAF); >>> +  if (flag_tm) >>> +    apply_tm_attr (bui

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Richard Guenther
On Sat, Nov 5, 2011 at 4:09 PM, Aldy Hernandez wrote: > >>> Richi, if it's the use of the bit in the tree node that you're worried >>> about, >>> we could probably put it in cgraph_node.local instead.  But we do need >>> the >>> knowledge. >> >> Yeah, I was worried about /* 1 bit left */ ;)  Putti

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Aldy Hernandez
[rth, see below] local_define_builtin ("__builtin_eh_pointer", ftype, BUILT_IN_EH_POINTER, "__builtin_eh_pointer", ECF_PURE | ECF_NOTHROW | ECF_LEAF); + if (flag_tm) +apply_tm_attr (builtin_decl_explicit (BUILT_IN_EH_POINTER), + get_identifier ("t

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Aldy Hernandez
Richi, if it's the use of the bit in the tree node that you're worried about, we could probably put it in cgraph_node.local instead. But we do need the knowledge. Yeah, I was worried about /* 1 bit left */ ;) Putting it in the cgraph node sounds more appealing indeed. Richi, is this a blo

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Richard Guenther
On Sat, Nov 5, 2011 at 3:54 AM, Richard Henderson wrote: > On 11/04/2011 07:36 PM, Richard Henderson wrote: >> On 11/04/2011 03:36 AM, Richard Guenther wrote: > +    case GIMPLE_TRANSACTION: > +      return (weights->tm_cost > +             + estimate_num_insns_seq (gimple_transaction_

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Richard Guenther
On Sat, Nov 5, 2011 at 3:24 AM, Richard Henderson wrote: > On 11/04/2011 04:53 PM, Aldy Hernandez wrote: >>> Why is it necessary to know whether a clone is a tm clone? >> >> How do you mean?  First, there are a few pretty printing places where we >> dump that a function is a clone.  It is easy to

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-05 Thread Aldy Hernandez
On 11/04/11 08:26, Michael Matz wrote: Hi, On Thu, 3 Nov 2011, Aldy Hernandez wrote: +/* GIMPLE_EH_ELSE must be the sole contents of + a GIMPLE_TRY_FINALLY node. For all normal exits from the try block, + we N_BODY is run; for all exception exits from the try block, s/we // Fixed

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-04 Thread Richard Henderson
On 11/04/2011 07:36 PM, Richard Henderson wrote: > On 11/04/2011 03:36 AM, Richard Guenther wrote: +case GIMPLE_TRANSACTION: + return (weights->tm_cost + + estimate_num_insns_seq (gimple_transaction_body (stmt), + weight

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-04 Thread Richard Henderson
On 11/04/2011 03:36 AM, Richard Guenther wrote: >> > +case GIMPLE_TRANSACTION: >> > + return (weights->tm_cost >> > + + estimate_num_insns_seq (gimple_transaction_body (stmt), >> > + weights)); >> > + > Huh, so we now have non-lowered gimpl

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-04 Thread Richard Henderson
On 11/04/2011 04:53 PM, Aldy Hernandez wrote: >> Why is it necessary to know whether a clone is a tm clone? > > How do you mean? First, there are a few pretty printing places where we dump > that a function is a clone. It is easy to debug dumps when you know which > function is the clone and w

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-04 Thread Aldy Hernandez
Richard, I am going to address your suggestions in pieces, with individual patchsets, so we can tackle the less trivial bits in separate patches. So don't worry, I'm not forgetting the rest your suggestions. Below I will address what I fix with this patch. +/* Nonzero in a FUNCTION_DECL mean

Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-04 Thread Michael Matz
Hi, On Thu, 3 Nov 2011, Aldy Hernandez wrote: > +/* GIMPLE_EH_ELSE must be the sole contents of > + a GIMPLE_TRY_FINALLY node. For all normal exits from the try block, > + we N_BODY is run; for all exception exits from the try block, s/we // > +++ gcc/calls.c (.../branches/transacti

[patch] 19/n: trans-mem: compiler tree/gimple stuff

2011-11-03 Thread Aldy Hernandez
These are misc tree and gimple patches, which I consider front-ish-end changes. Index: gcc/tree.c === --- gcc/tree.c (.../trunk) (revision 180744) +++ gcc/tree.c (.../branches/transactional-memory) (revision 180773) @@ -95