This is the mail archive of the
mailing list for the GCC project.
Re: RTL definition
"Fran Baena" <firstname.lastname@example.org> writes:
> 2008/3/10, Jim Wilson <email@example.com>:
>> Fran Baena wrote:
>> > RTL represents a low-level language, machine-independent. But I didn't
>> > find any especification of such language represented. This is, I found
>> > no document where the language represented were described or defined
>> > in a grammar way.
>> RTL isn't a programming language, and hence has no grammar. It is
>> merely one of the internal representations that gcc uses for optimizing
>> and generating code. We do have gcc internals documentation that you
>> have already been pointed at.
> i agree with you, RTL is not a programming language, is a language
> that is represented internally. But it could match a grammar
> definition. And this is my question, what is the process to define a
RTL is a set of data structures. It's defined by rtl.def and rtl.h.
The closest thing to a grammar for RTL is rtl.def, which defines how
each of the fields are represented given the RTL code.
By the way, RTL is not really machine-independent. The data
structures are machine independent. But the contents are not. You
can not, even in principle, take the RTL generated for one processor
and compile it on another processor.