This is the mail archive of the
mailing list for the GCC project.
Re: FW: Question about Gimple FE
- From: Diego Novillo <dnovillo at google dot com>
- To: 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, 3 Apr 2015 11:41:35 -0400
- 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>
On Fri, Apr 3, 2015 at 11:35 AM, Jeff Law <email@example.com> wrote:
> On 04/03/2015 09:30 AM, Diego Novillo wrote:
>> On Fri, Apr 3, 2015 at 11:10 AM, xue yinsong <firstname.lastname@example.org>
>>> 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 tuple-based
>> syntax that is very easy to parse. But that was only chosen because it
>> simplifies parsing.
>> You first need to design a text representation for the IL that allows
>> conveying all the elements needed to instantiate the in-memory
>> representation of gimple.
> Crazy idea, what about something that's modeled after LLVM's representation?
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.