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: 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


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