Entry #4: Internals of GCC
"Internals of GCC" is a 53 minutes long podcast produced in 2007 by Software Engineering Radio with Morgan Deters as guest. GCC is a set of compilers for various languages including ADA, C, C++, Fortran, Objective C and Java at one point.
GCC provides the whole infrastructure to build software in those languages mentioned before, going from Source Code to Assembly. GCC works in three main sections, each one works in a different aspect of the compiler:
- Front-End: In this section, the compiler acknowledges the language we are using to generate a tree structure that shows the program description and that will pass to the next section.
- Middle-End: In this section, the optimization of the tree passed from the Front-End section occurs. This section makes the code more efficient and makes a transformation to a more generic code, as it takes this generic form and converts it into low-level structures called Register Transfer Language (RTL). During this process, some optimizations and workarounds are made, like Object-Oriented Languages must be converted into something that C can understand. Finally, the RTL representation is passed to the Back-End and it converts it into a target architecture.
- Back-End: In this section, after the tree is optimized, it will be sent to the architecture it needs and it will become target code.
At the end of the podcast, Morgan Deters was asked about his favorite language and he said that he doesn’t have one. He analyzes the problem and tries to look for the best approach as every language has advantages and disadvantages, but the compiler is the one that knows how to use most of the hardware.
Podcast: Software Engineering Radio. (2007). Episode 61: Internals of GCC. Recovered from http://www.se-radio.net/2007/07/episode-61-internals-of-gcc/
Comentarios
Publicar un comentario