This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Introduce macros when constructing the tree of passes


On Thu, 2013-07-18 at 10:18 -0600, Jeff Law wrote:
> On 07/17/2013 07:18 PM, David Malcolm wrote:
> > gcc/
> > 	* passes.c (init_optimization_passes): Introduce macros for
> > 	constructing the tree of passes (INSERT_PASSES_AFTER,
> > 	PUSH_INSERT_PASSES_WITHIN, POP_INSERT_PASSES,
> > 	TERMINATE_PASS_LIST).
> > ---
> >   gcc/passes.c | 108 +++++++++++++++++++++++++++++++----------------------------
> >   1 file changed, 56 insertions(+), 52 deletions(-)
> >
> > diff --git a/gcc/passes.c b/gcc/passes.c
> > index 761f030..6ca4134 100644
> > --- a/gcc/passes.c
> > +++ b/gcc/passes.c
> > @@ -1282,13 +1282,26 @@ init_optimization_passes (void)
> >   {
> >     struct opt_pass **p;
> >
> > +#define INSERT_PASSES_AFTER(PASS) \
> > +  p = &(PASS);
> > +
> > +#define PUSH_INSERT_PASSES_WITHIN(PASS) \
> > +  { \
> > +    struct opt_pass **p = &(PASS).pass.sub;
> > +
> > +#define POP_INSERT_PASSES() \
> > +  }
> > +
> I've never been a fan of having unmatched braces inside macros; though I 
> guess I can live with it particularly since it'll help catch an 
> unmatched push/pop.
> 
> 
> OK for the trunk.
Thanks; committed to svn trunk as r201037.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]