From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18746 invoked by alias); 8 Nov 2009 17:42:18 -0000 Received: (qmail 18692 invoked by uid 22791); 8 Nov 2009 17:42:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pw0-f57.google.com (HELO mail-pw0-f57.google.com) (209.85.160.57) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Nov 2009 17:42:13 +0000 Received: by pwi2 with SMTP id 2so295930pwi.16 for ; Sun, 08 Nov 2009 09:42:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.21.11 with SMTP id y11mr362808rvi.212.1257702131937; Sun, 08 Nov 2009 09:42:11 -0800 (PST) In-Reply-To: <4AF70170.9090401@sbcglobal.net> References: <4AF70170.9090401@sbcglobal.net> Date: Sun, 08 Nov 2009 17:42:00 -0000 Message-ID: <84fc9c000911080942h62bf48b4icb416aeefae2d8f3@mail.gmail.com> Subject: Re: [Re: new plugin events] From: Richard Guenther To: Terrence Miller Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00204.txt.bz2 On Sun, Nov 8, 2009 at 6:35 PM, Terrence Miller w= rote: > < Forwarded due to missing address> > > -------- Original Message -------- > Subject: =A0 =A0 =A0 =A0Re: new plugin events > Date: =A0 Sun, 08 Nov 2009 18:25:21 +0100 > From: =A0 Basile STARYNKEVITCH > To: =A0 =A0 Terrence Miller > References: =A0 =A0 <4AE72A4F.8000303@starynkevitch.net> > <4AF28075.7020808@starynkevitch.net> <4AF291A6.7000600@starynkevitch.net> > <38a0d8450911050824l838fd92ya9f3a08205c80a85@mail.gmail.com> > <4AF33453.7090200@starynkevitch.net> > <38a0d8450911060724h3c6f9ddh3e84c2c763ac4de0@mail.gmail.com> > > <84fc9c000911060818s3462aff1r1ebfb298506b6939@mail.gmail.com> > > <4AF4634D.5050303@starynkevitch.net> > > <4AF47257.8040307@starynkevitch.net> <4AF6FB88.4030303@sbcglobal.net> > > > > Terrence Miller wrote: >> >> I think this debate is missing one important issue. In order to generate= a >> patch to GCC >> you have to know a lot more about the compiler internals than is required >> to create >> a plugin. =A0I am doing some casual experimentation with compiler based >> source browsing >> and would love to have the DECL event(described below) added to the plug= in >> API. >> I would prefer to not have to figure where that plugin should be called. >> > > It is perhaps true for the DECL event you are talking about (which I did = not > understood fully), but I won't say that coding a plugin is *in general* > easier than proposing a patch to core GCC. > > My perception is that most *middle* end plugins are working on Gimple and > other middle-end representations. Usually, they do that by adding a pass = in > the pass machinery. And knowing what pass to add (or replace) is as > difficult when coding a plugin than when coding a patch to GCC core. > > Conversely, I would suspect than many previous patches (which have now bee > incorporated in GCC core) could have if a plugin machinery have been > available at their time (which is false since plugin facilities is just > coming in 4.5 which has not yet been released), first been developped as > plugins -at least to experiment their viability & interest- and later one > proposed as a patch. > > This is why I believe that plugins will probably -at least for middle-end > processing- have also the role of GCC branches today, with a very importa= nt > difference. Almost nobody compiles branches today (in the general GCC user > community - I am not talking of the smaller GCC developper community), and > it could be the case that some plugins will be used. > > For example, as far as I know, no common Linux distribution provides a > package for any kind of GCC branch. I believe (perhaps I am too optimisti= c) > that some Linux distributions will package some few GCC plugins. You keep re-iterating this (IMHO bogus) argument. I don't see how a plugin in development is any different here - nobody will build or distribute it. OTOH after a branch is mature it will be merged into the GCC core, so it will be immediately available in distributed GCCs. Richard.