This is the mail archive of the
mailing list for the GCC project.
Re: FW: Question about Gimple FE
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Diego Novillo <dnovillo at google dot com>,Jeff Law <law at redhat dot com>
- Cc: xue yinsong <xyshh94225 at hotmail dot com>,GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 03 Apr 2015 19:05:48 +0200
- Subject: Re: FW: Question about Gimple FE
- Authentication-results: sourceware.org; auth=none
- References: <BLU436-SMTP393D735E667D7744698A4D85080 at phx dot gbl> <CAFiYyc0ukmm0w+YPQ1QOV2Vw3euPmVZR2MLHsjc25XB9T0ds8w at mail dot gmail dot com> <BLU436-SMTP23617265C8657F936DF78CF85090 at phx dot gbl> <CAFiYyc3Ryj6mj9o-JeJwfBHfHavQDD-iA_8gW9taoUEehKLWdw at mail dot gmail dot com> <CAFiYyc2eje=Fx5DRRDOktqvv0=MDp8vK54AKvKuwWRbM4u5-DQ at mail dot gmail dot com> <BLU437-SMTP126C99D3E9C8BD08E2658385F10 at phx dot gbl> <551E9992 dot 7020608 at google dot com> <6B559995-4BD4-4EC3-B8B0-6261767B8740 at hotmail dot com> <BLU436-SMTP6095BDF79AC949FCD664E485F10 at phx dot gbl> <CAD_=9DR9pZ6TSA-73kzeEPo+=3-PsCUQhEynn=-vF=gOoQ0J8A at mail dot gmail dot com> <551EB355 dot 8010607 at redhat dot com> <CAD_=9DSp5bniJ+uPTyLqS+GP-ERPudzgcLSDuZ2BR7Q64V3g4w at mail dot gmail dot com>
On April 3, 2015 5:41:35 PM GMT+02:00, Diego Novillo <email@example.com> wrote:
>On Fri, Apr 3, 2015 at 11:35 AM, Jeff Law <firstname.lastname@example.org> wrote:
>> On 04/03/2015 09:30 AM, Diego Novillo wrote:
>>> On Fri, Apr 3, 2015 at 11:10 AM, xue yinsong
>>>> So itâs better not to try to read the exact dump format.
>>>> Could we use a similar but more complete syntax instead?
>>> Absolutely. The initial attempt for gimple fe was to use a
>>> syntax that is very easy to parse. But that was only chosen because
>>> simplifies parsing.
>>> You first need to design a text representation for the IL that
>>> conveying all the elements needed to instantiate the in-memory
>>> representation of gimple.
>> Crazy idea, what about something that's modeled after LLVM's
>I was hesitant to offer this option, but it's certainly a good
>starting point. The representation encodes CFG, SSA, attributes,
>declarations and annotations. It has a relatively fixed syntax, which
>makes it easy to parse.
The other way is to reuse an existing frontend and add extensions so you can annotate stuff or use obscure middle end features. Like the C frontend.