This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTL to Simple Three instruction code


>I'm working on a project which involves performing some optimizations
>and annotating three-address code. We've been looking for some suitable
>framework which can give us IR (in three-instruction format). We studied
>many compiler infrastructures like SUIF, trimaran, zephyr and so on.
>
>We feel that we can use gcc keeping in mind long-term usability and
>extensibility. So is there any way of generating simple three-instruction
>code from RTL (or tree representation) of gcc? Or is there a way of
>reading and writing the string representation of RTL so that we can decide
>on our own IR? Any help and suggestions for a getting three-instruction
>code or writting programs for doing so will be of very much help.

I think it would be pretty easy to develop a GCC port to a three
address architecture(TAA) paper machine.  In fact its probabaly easier
to do that than any of the *real* chips that GCC has been ported to
since there are little to *none* of the restrictions that real chips
have(offset limitations, instruction/register scheduling, addressing
restrictions, etc).

Read the documentation on the interanls of GCC and you should be able
to put together a very simple set of target macros/functions to
generate "assembler" code for your specific TAA.  Since you are
planning on doing your own optimizations it shouldn't matter how
efficient the code is that the port generates for your paper TAA...
You could probably start with the VAX port since it is one of the more
general ports that gcc supports...

-- 
Peter Barada
peter@baradas.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]