This is the mail archive of the
mailing list for the GCC project.
Re: SIMPLE: A language-independent tree IR
- From: Joe Buck <jbuck at synopsys dot COM>
- To: jsm28 at cam dot ac dot uk (Joseph S. Myers)
- Cc: dnovillo at redhat dot com (Diego Novillo), gcc at gcc dot gnu dot org
- Date: Wed, 2 Jan 2002 12:22:25 -0800 (PST)
- Subject: Re: SIMPLE: A language-independent tree IR
> > trees into SIMPLE. But, is it possible to translate SIMPLE
> > into RTL in a language-independent way?
Joseph S. Myers wrote:
> 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.
Joseph mentioned sequence points and aliasing. It seems that "volatile"
also has to be taken into account, so the common back end knows which
writes can be optimized away.
> 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?
Perhaps this is best handled in a framework like SIMPLE by using different
OPs. That is, if lang-1 says that overflow of signed integer arithmetic
is undefined but lang-2 requires an exception to be thrown, then a
different OP would be used; alternatively, the latter could be defined in
terms of the former plus extra code.