This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Jan 2002 18:42:00 +0000 (GMT)
- Subject: Re: SIMPLE: A language-independent tree IR
On Wed, 2 Jan 2002, Diego Novillo wrote:
> Any tree expression that does not conform to this must be broken
> down into a sequence of these 14 expressions. For reference, I'm
> attaching SIMPLE's BNF grammar. For instance,
One thing I'd like in language-independent trees (at some level) is that
ordering (sequence point) and aliasing constraints are explicitly
represented (that is, language-dependent trees, in which these are
implicit, are converted to language-independent trees, in which these are
explicit). Optimization decisions should be able to be taken about which
of multiple orderings is best to use, rather than such choices being an
accident of the conversion process. Thus, there should be a
language-independent form that is not simply a sequence of expressions,
but has more complicated embedded ordering information. (Remembering such
cases as that function calls do not overlap, though the order of
evaluation may be unspecified; which we need to get correct in the
presence of inlining.)
> trees into SIMPLE. But, is it possible to translate SIMPLE
> into RTL in a language-independent way?
Any language-independent tree form must be converted to RTL by a single
convertor - all language dependencies must have been removed in the
lowering to the language-independent form.
There may be other C assumptions in the current tree forms to consider and
maybe change - for example, are the C rules that overflow of signed
integer arithmetic is undefined appropriate for all languages, or is this
another matter that should be explicitly represented in the various forms?
--
Joseph S. Myers
jsm28@cam.ac.uk