Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-25 Thread Diego Novillo
On 12-05-25 14:27 , Tom Tromey wrote: "Diego" == Diego Novillo writes: Diego> +struct GTY(()) vec_prefix Diego> +{ Diego> + unsigned num; Diego> + unsigned alloc; Diego> +}; Diego> + Diego> +/* Vector type, user visible. */ Diego> +template Diego> +struct GTY(()) vec_t Diego> +{ D

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-25 Thread Gabriel Dos Reis
On Fri, May 25, 2012 at 1:27 PM, Tom Tromey wrote: >> "Diego" == Diego Novillo writes: > > Diego> +struct GTY(()) vec_prefix > Diego> +{ > Diego> +  unsigned num; > Diego> +  unsigned alloc; > Diego> +}; > Diego> + > Diego> +/* Vector type, user visible.  */ > Diego> +template > Diego> +struc

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-25 Thread Tom Tromey
> "Diego" == Diego Novillo writes: Diego> +struct GTY(()) vec_prefix Diego> +{ Diego> + unsigned num; Diego> + unsigned alloc; Diego> +}; Diego> + Diego> +/* Vector type, user visible. */ Diego> +template Diego> +struct GTY(()) vec_t Diego> +{ Diego> + vec_prefix prefix; Diego> + T GTY((

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Lawrence Crowl
On 5/24/12, Diego Novillo wrote: > On 12-05-24 04:16 , Richard Guenther wrote: >> On May 23, 2012 Diego Novillo wrote: >>> Some client code changes were needed: >>> >>> 1- The allocation names 'heap', 'stack' and 'gc' are not embedded in >>>the type name anymore. They are enum values used as

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Diego Novillo
I have committed these three patches as a single revision r187836 on cxx-conversion. I will address further comments to the patch in subsequent changes. Andrew, if you have some time, could you see if you can recreate that LTO aliasing failure you were describing earlier? I may change the da

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Diego Novillo
On 12-05-24 04:16 , Richard Guenther wrote: On Wed, May 23, 2012 at 9:48 PM, Diego Novillo wrote: This series of 3 patches re-implement vec.[ch] in C++. The main goal of this first step is to minimize changes to client code. I tried very hard to maintain the existing API. This means that ve

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Diego Novillo
On 12-05-24 04:20 , Andrew Pinski wrote: On Thu, May 24, 2012 at 1:16 AM, Richard Guenther wrote: I believe this was because of aliasing - you may dig in the svn history to find out what we miscompiled when not doing this and whether it is still necessary or not. Yes it was done for aliasin

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Gabriel Dos Reis
On Thu, May 24, 2012 at 3:16 AM, Richard Guenther wrote: >> Some client code changes were needed: >> >> 1- The allocation names 'heap', 'stack' and 'gc' are not embedded in >>   the type name anymore.  They are enum values used as a template >>   argument for functions like VEC_alloc() and VEC_fr

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-24 Thread Gabriel Dos Reis
On Wed, May 23, 2012 at 2:48 PM, Diego Novillo wrote: > > This series of 3 patches re-implement vec.[ch] in C++. > this is fantastic! The changes look good to me. -- Gaby

Re: [cxx-conversion] Convert vec.[ch] to C++ [1/3] (issue6233044)

2012-05-23 Thread Lawrence Crowl
On 5/23/12, Diego Novillo wrote: > OK for cxx-conversion branch? LGTM. -- Lawrence Crowl