Article View: gnu.gcc.help
Article #51803Converting to RTL format
From: Vince Delle Donne
Date: Thu, 01 Apr 1993 20:07
Date: Thu, 01 Apr 1993 20:07
58 lines
3613 bytes
3613 bytes
To all gcc experts,
I'll explain the context before asking the question:
We are currently taking over a compiler (a research
project from McGill university) that will perform
compilation (for a number of platforms,
e.g. RS/6000, T800, i860, etc...). The idea is to
exploit fine-grain parallelism; so the compiler design is driven
by analyses (general alias and dependency analysis) and
transformations that ultimately generate programs.
The compiler is divided into 3 phases: FIRST, SIMPLE and LAST.
FIRST: This is really just the parser phase. This phase was
taken from gcc.
SIMPLE: This phase is where dependency analysis, alias analysis,
and software pipelining etc.
are performed. It is basically a 3-address form of FIRST. We
created our own AST, which is a simplification of the original AST.
The SIMPLE grammar is powerful enough to incorporate almost all C
language constructs, yet simple enough so that optimization and
analyses rules can be applied. It is hardware-independent.
LAST: This phase takes care of instruction scheduling and register
allocation, and code generation. It is really a binary tree, from
which BURG is used to walk the tree and spit out code. In order to
do this, we have to write up machine description files. They are
much less complicated than the ones provided in gcc, but nonetheless
a lot of work is required to fully test these .md files.
I hope the context is clear enough. The idea now is to somehow
reconcile our compiler (which currently compiles only on a
theoretical machine DLX) with gcc at the LAST level, in order to
make code generation for all the target architectures more efficient.
We would like to take advantage of the fact that gcc is a respected,
popular compiler that generates code for most of the architectures we
will ever require.
In order to do this, we have to convert our LAST binary tree
representation of the user program to RTL format. The question is
where is the entry point of RTL generation? We would like to
take advantage of the machine-specific optimizations done after
RTL is generated from AST.
So, which entry point do you suggest?
Do you think using this approach is feasible?
If so, in your experience, how long does it usually take an
above-average Masters student to understand the RTL generation phase?
Do you have any comments that may help us?
Any warnings or problems you may see in our approach?
Any good source of documentation on RTL?
Vince Delle Donne
Research agent
Computer Research Institute of Montreal
(514)398-5475
Technical Details
Message-ID:
<donne.733694825@ness>Path:
arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!utcsri!newsflash.concordia.ca!sifon!clouso.crim.ca!ness!donneShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,c32dca9aa4b7978e,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-04-01 12:48:48 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!utcsri!newsflash.concordia.ca!sifon!clouso.crim.ca!ness!donne From: donne@crim.ca (Vince Delle Donne) Subject: Converting to RTL format Message-ID: <donne.733694825@ness> Summary: Combining gcc's RTL with our compiler to generate code Keywords: gcc, RTL Sender: news@crim.ca Nntp-Posting-Host: drebin.crim.ca Organization: CRIM (Centre de Recherche Informatique de Montreal) Date: Thu, 1 Apr 1993 20:07:05 GMT Lines: 60