Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-11-05 Thread Eric Botcazou
Done and committed. That's great, thanks! -- Eric Botcazou

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-11-02 Thread Eric Botcazou
Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl cr...@google.com * is-a.h: New. (is_a T (U*)): New. Test for is-a relationship. (as_a T (U*)): New. Treat as a derived type. (dyn_cast T (U*)): New. Conditionally cast based on is_a. * cgraph.h

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-11-02 Thread Lawrence Crowl
On 11/2/12, Eric Botcazou ebotca...@adacore.com wrote: Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl cr...@google.com * is-a.h: New. (is_a T (U*)): New. Test for is-a relationship. (as_a T (U*)): New. Treat as a derived type. (dyn_cast T (U*)): New. Conditionally

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Diego Novillo
On 2012-10-29 15:01 , Lawrence Crowl wrote: On 10/27/12, Marc Glisse marc.gli...@inria.fr wrote: On Fri, 26 Oct 2012, Lawrence Crowl wrote: 2012-10-26 Lawrence Crowl cr...@google.com missing '' Fixed. * is-a.h: New. (is_a T (U*)): New. Test for is-a relationship.

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Richard Biener
On Tue, Oct 30, 2012 at 1:20 PM, Diego Novillo dnovi...@google.com wrote: On 2012-10-29 15:01 , Lawrence Crowl wrote: On 10/27/12, Marc Glisse marc.gli...@inria.fr wrote: On Fri, 26 Oct 2012, Lawrence Crowl wrote: 2012-10-26 Lawrence Crowl cr...@google.com missing '' Fixed.

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Jan Hubicka
2012-10-29 Lawrence Crowl cr...@google.com * is-a.h: New. (is_a T (U*)): New. Test for is-a relationship. (as_a T (U*)): New. Treat as a derived type. (dyn_cast T (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Lawrence Crowl
On 10/30/12, Diego Novillo dnovi...@google.com wrote: On 2012-10-29 15:01 , Lawrence Crowl wrote: On 10/27/12, Marc Glisse marc.gli...@inria.fr wrote: On Fri, 26 Oct 2012, Lawrence Crowl wrote: 2012-10-26 Lawrence Crowl cr...@google.com missing '' Fixed. * is-a.h: New. (is_a T

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Diego Novillo
On Tue, Oct 30, 2012 at 4:53 PM, Lawrence Crowl cr...@googlers.com wrote: On 10/30/12, Diego Novillo dnovi...@google.com wrote: So, to use these three functions, the user must define this single 'is_a_helper' routine? Nothing else? You need to distinguish which kind user. Someone just

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Lawrence Crowl
On 10/30/12, Diego Novillo dnovi...@google.com wrote: On Tue, Oct 30, 2012 at 4:53 PM, Lawrence Crowl cr...@googlers.com wrote: On 10/30/12, Diego Novillo dnovi...@google.com wrote: So, to use these three functions, the user must define this single 'is_a_helper' routine? Nothing else? You

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-30 Thread Xinliang David Li
Good cleanup! Simple and consistent interfaces are usually self-documenting, and this one is a good step forward. thanks, David On Tue, Oct 30, 2012 at 2:09 PM, Lawrence Crowl cr...@googlers.com wrote: On 10/30/12, Diego Novillo dnovi...@google.com wrote: On Tue, Oct 30, 2012 at 4:53 PM,

Re: [patch] Apply conditional down cast to cgraph.h et.al.

2012-10-29 Thread Lawrence Crowl
On 10/27/12, Marc Glisse marc.gli...@inria.fr wrote: On Fri, 26 Oct 2012, Lawrence Crowl wrote: 2012-10-26 Lawrence Crowl cr...@google.com missing '' Fixed. * is-a.h: New. (is_a T (U*)): New. Test for is-a relationship. (as_a T (U*)): New. Treat as a derived type.

[patch] Apply conditional down cast to cgraph.h et.al.

2012-10-26 Thread Lawrence Crowl
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a TYPE (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a TYPE (pointer) Converts