Is IR machine independent?

Marty Hauff marty.hauff@rmit.edu.au
Sun Jul 27 21:50:00 GMT 2003


>From Section 9 - Machine Descriptions of "GNU Compiler Collection Internals", the process of compiling essentially follows 3 steps:
1. 'C' code -> Parse Tree
2. Parse Tree -> Standard RTL sequences
3. RTL sequences -> target assembly.

It could be claimed that there are in fact 2 IR languages (of sorts) used by GCC - Trees and RTX (rtl expressions).  Trees are target independent.  RTX is generated based on a specific machine description and is therefore target dependent.

Hope this helps.
Marty Moose
>>> "Xingbo Wang" <xingbo.wang@linuxforum.net> 07/24/03 21:09 PM >>>
Hello guys, a friend of mine have a question below.
Pls answer him via his mail instead of mine :-)
Thanks!

------------------
Is gcc's intermediate representation machine dependent??

I'm trying to introduce a new language to gcc frontend.
And I wonder wheather the intermediate representation(IR)
of gcc is machine dependent or not.

I have read some info on internet.But some say gcc'IR is
machine dependent while some say not.
Anyone would like to tell me the truth?

Thanks a lot.

Bing Shen
sshen@microscience.com.cn
------------------




More information about the Gcc mailing list