public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Design Considerations of GIMPLE Front End
@ 2010-05-17 20:21 Sandeep Soni
  2010-05-17 21:04 ` Andrew Haley
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Sandeep Soni @ 2010-05-17 20:21 UTC (permalink / raw)
  To: GCC LIST; +Cc: Diego Novillo

Hi,

As part of GSoC 2010, I am developing a front end for GIMPLE.
You can find the basic theme of the project at:
http://gcc.gnu.org/wiki/GimpleFrontEnd

One of the most important components in this GIMPLE Front End is to
convert the GIMPLE tuples into text.
How such a textual representation should be, will obviously dictate
the design and complexity of the
subsequent parsing component. So, as per Diego's suggestion, to have a
view on some of the issues
I have started this thread.

Following are some of the issues/questions that have come  up:

1. What should be the format of representation of the GIMPLE tuples in text?

   Ideally, the textual representation should be satisfying two goals:
Easy to parse and easy for a programmer
   to write by hand.Considering this,what is the best way in which the
GIMPLE tuples be represented.

   For example:
   A textual GIMPLE tuple for the statement a=b+c can be like
   <GIMPLE_ASSIGN<PLUS_EXPR,a,b,c>>  (As demonstrated by the internal
manual also).
   Is such a representation easy to parse?

   The other alternative is to represent the tuples in a C-like syntax
much like what -fdump-tree-gimple flag does.

   Which is more better? In terms of ease in parsing, intuitiveness
for a programmer to code by hand etc.
   Any other alternative?

2. The most important aspect in the representation is that of types.
Since there are many possibilities in
   the types, mapping each in a common representation can be
difficult. An approach suggested by Diego is to
   read what fields are read from 'tree' structures and then lay out
the tuples as follows:

   <TREE_TYPE <name, size, ...>>

   So, we make all the sub-structures into nested tuples. This seems
to be easy to parse.
   Again the question: Are there any ideas from anybody about the way
the types be
   represented so that the parsing becomes simple?

3. Finally, what could be the overall structure of such a textual
gimple file. A possible way could be to have the
    same structure as the sections encoded in the bytestream.So we can
have a section for types, symbols,
    function bodies etc. Such a simple structure will be helpful for
any programmer and be relatively easy to parse.
    Any other ideas? arguments against such a structure?


So, If there are any alternative ideas to any one of these or
arguments in favour of /against the ideas presented
in this mail. Please add it to this thread.

If there are any more vital points which are missing in this mail but
require serious discussions,
please add them to this thread too.
--
Cheers
Sandy

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-06-03 23:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-17 20:21 Design Considerations of GIMPLE Front End Sandeep Soni
2010-05-17 21:04 ` Andrew Haley
2010-05-18  3:25   ` Sandeep Soni
2010-05-18  8:39     ` Andrew Haley
2010-05-18 13:18 ` Diego Novillo
2010-05-18 14:00   ` Michael Matz
2010-05-18 14:09     ` Diego Novillo
2010-05-18 14:18       ` Steven Bosscher
2010-05-18 14:46         ` Dave Korn
2010-05-18 14:52           ` Andrew Haley
     [not found]             ` <AANLkTilQWdLDrQypzwqbzTKsUYKyPKMvHMKVClFvZJWH@mail.gmail.com>
2010-05-18 15:04               ` Diego Novillo
2010-05-18 15:24                 ` Sandeep Soni
2010-05-18 14:30     ` Basile Starynkevitch
2010-05-18 14:32       ` Richard Guenther
2010-05-18 14:47       ` Steven Bosscher
2010-06-04  8:24 ` Sebastian Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).