From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2185 invoked by alias); 18 Jul 2013 16:18:34 -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 2168 invoked by uid 89); 18 Jul 2013 16:18:33 -0000 X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_40,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS 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 16:18:33 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6IGIPnn028201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Jul 2013 12:18:25 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-168.phx2.redhat.com [10.3.113.168]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6IGIP83000784; Thu, 18 Jul 2013 12:18:25 -0400 Message-ID: <51E81551.7040306@redhat.com> Date: Thu, 18 Jul 2013 16:21:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: David Malcolm CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/4] Introduce macros when constructing the tree of passes References: <1374110303-9758-1-git-send-email-dmalcolm@redhat.com> <1374110303-9758-2-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1374110303-9758-2-git-send-email-dmalcolm@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00722.txt.bz2 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. jeff