Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-08-05 Thread Gabriel Dos Reis
On Mon, Aug 5, 2013 at 6:24 AM, Martin Jambor wrote: […] >> > Note that as per >> > http://gcc.gnu.org/ml/gcc-patches/2013-07/msg01365.html >> > we'll use "pass_manager" rather than "pipeline", so this would look >> > like: >> > pass_manager &get_passes () { gcc_assert (passes_); return *passe

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-08-05 Thread Martin Jambor
Hi, On Fri, Aug 02, 2013 at 11:30:01PM -0500, Gabriel Dos Reis wrote: > [ Adding Benjamin, Diego, Lawrence ] > > General remarks first: > When we designed the coding standards for GCC, an overriding > philosophy was that we did not want to be prescriptive. Rather, we > explicitly wanted to encou

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-08-02 Thread Gabriel Dos Reis
On Tue, Jul 30, 2013 at 4:30 AM, Martin Jambor wrote: >> I'm voting for references. References can be seen as yet another >> software structuring tool that instantly communicate some properties >> such as you mentioned above. In addition to that it's also a hint of >> ownership, i.e. if I get a

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-08-02 Thread Gabriel Dos Reis
On Tue, Jul 30, 2013 at 4:11 AM, Martin Jambor wrote: > Moreover, I think we should be extra careful here because GCC is > transitioning from C and many developers are used to expect C > semantics, we will be mixing new C++ code with C code a lot in the > future and even though we hope to reduce

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-08-02 Thread Gabriel Dos Reis
[ Adding Benjamin, Diego, Lawrence ] General remarks first: When we designed the coding standards for GCC, an overriding philosophy was that we did not want to be prescriptive. Rather, we explicitly wanted to encourage common sense and trust the judgment of maintainers to make sound and appropria

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-07-30 Thread Oleg Endo
On Tue, 2013-07-30 at 11:30 +0200, Martin Jambor wrote: > Hi, > > On Mon, Jul 29, 2013 at 09:02:53PM +0200, Oleg Endo wrote: > > On Mon, 2013-07-29 at 14:20 -0400, David Malcolm wrote: > > > > > > > > The same here and at a few other places. It may be just me not being > > > > used to references

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-07-30 Thread Martin Jambor
Hi, On Mon, Jul 29, 2013 at 09:02:53PM +0200, Oleg Endo wrote: > On Mon, 2013-07-29 at 14:20 -0400, David Malcolm wrote: > > > > > > The same here and at a few other places. It may be just me not being > > > used to references... nevertheless, if someone really wants to use > > > them like this,

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-07-30 Thread Martin Jambor
Hi, thanks for the email I was supposed to write. On Mon, Jul 29, 2013 at 02:20:02PM -0400, David Malcolm wrote: > On Thu, 2013-07-25 at 15:08 +0200, Martin Jambor wrote: > > Hi, > > > > I don't know why it's me again but again I do have a few comments. > > Thanks for looking over the patch. >

Re: C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-07-29 Thread Oleg Endo
On Mon, 2013-07-29 at 14:20 -0400, David Malcolm wrote: > > > > The same here and at a few other places. It may be just me not being > > used to references... nevertheless, if someone really wants to use > > them like this, at least make them const and you will save a night of > > frantic debuggi

C++ coding conventions: namespaces, references and getters (was Re: [PATCH 2/2] Introduce beginnings of a pipeline class.)

2013-07-29 Thread David Malcolm
On Thu, 2013-07-25 at 15:08 +0200, Martin Jambor wrote: > Hi, > > I don't know why it's me again but again I do have a few comments. Thanks for looking over the patch. > One global remark first: If we are going to start using the gcc > namespace (I understand it you need for isolation of symbols

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-25 Thread Martin Jambor
Hi, I don't know why it's me again but again I do have a few comments. One global remark first: If we are going to start using the gcc namespace (I understand it you need for isolation of symbols once you use gcc as library, right?), I'm wondering whether mixing "using namespace gcc" and explicit

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-25 Thread Martin Jambor
Hi, On Wed, Jul 24, 2013 at 08:27:43PM -0400, David Malcolm wrote: > On Wed, 2013-07-24 at 19:10 -0400, Diego Novillo wrote: > > On Wed, Jul 24, 2013 at 6:56 PM, Diego Novillo wrote: > > > Could you please add a description of what this does? > > > > Sorry. You did, but in a previous message th

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread David Malcolm
On Wed, 2013-07-24 at 19:10 -0400, Diego Novillo wrote: > On Wed, Jul 24, 2013 at 6:56 PM, Diego Novillo wrote: > > Could you please add a description of what this does? > > Sorry. You did, but in a previous message that I had managed to miss. > Maybe include a reference to it in future posting

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread Diego Novillo
On Wed, Jul 24, 2013 at 6:56 PM, Diego Novillo wrote: > Could you please add a description of what this does? Sorry. You did, but in a previous message that I had managed to miss. Maybe include a reference to it in future postings? Diego.

Re: [PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread Diego Novillo
Could you please add a description of what this does? On Wed, Jul 24, 2013 at 11:09 AM, David Malcolm wrote: > gcc/ > * Makefile.in (PIPELINE_H): New. > (lto-cgraph.o): Depend on CONTEXT_H and PIPELINE_H. > (passes.o): Likewise. > (statistics.o): Likewise. >

[PATCH 2/2] Introduce beginnings of a pipeline class.

2013-07-24 Thread David Malcolm
gcc/ * Makefile.in (PIPELINE_H): New. (lto-cgraph.o): Depend on CONTEXT_H and PIPELINE_H. (passes.o): Likewise. (statistics.o): Likewise. (cgraphunit.o): Likewise. (context.o): Depend on PIPELINE_H. * pipeline.h: New. * cgraphunit.c