This is the mail archive of the 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

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

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