From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32005 invoked by alias); 18 Jul 2013 18:27:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31995 invoked by uid 89); 18 Jul 2013 18:27:05 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,TW_SV autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Jul 2013 18:27:04 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6IIQuFm012362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Jul 2013 14:26:57 -0400 Received: from [10.18.25.132] ([10.18.25.132]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6IIQupS004976; Thu, 18 Jul 2013 14:26:56 -0400 Message-ID: <1374172016.31223.74.camel@surprise> Subject: Re: [PATCH 1/4] Introduce macros when constructing the tree of passes From: David Malcolm To: Jeff Law Cc: gcc-patches@gcc.gnu.org Date: Thu, 18 Jul 2013 18:33:00 -0000 In-Reply-To: <51E81551.7040306@redhat.com> References: <1374110303-9758-1-git-send-email-dmalcolm@redhat.com> <1374110303-9758-2-git-send-email-dmalcolm@redhat.com> <51E81551.7040306@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00737.txt.bz2 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.