Internals of GCC

Hi, this entry will talk about an episode of the Software Engineering Radio. It is Episode 61 and is titled as “Internals of GCC”. The special guest is Morgan Deters and, basically, this podcast talks about compilers and how they internally the work. It covers all the steps of a GNU Compiler Collection construction (in this case GNU), going from parsing different programming languages to machine optimizations and processor binary code generation. 

At first, I thought that I would not understand many things in this podcast since I never heard the GCC concept before. Then I started to realize that it could be used to compile C code, or C++ code or even more. This is why I knew that this might be a very robust tool, so I started to expect a good explanation, which came later.
The GCC has three parts or aspects: The Front-End, Middle-End and the Back-end. I already heard the first and last term, since I have some experience in web development, but middle-end was new for me. 
Basically, in GCC, the front-end is described as some type of “black-box” that takes an input and converts it into a tree. The middle-end, that takes that output tree (grimple) and generates a more efficient, but equivalent to the first tree. At last, the back-end translates the received code into assembly code (or machine code) and uses the RTL (Register Transfer Level).

The GCC Compiler impressed me, principally because of the way it can be used for many languages. I also liked how its structure is well defined, aspect that facilitates its comprehension, even for people that aren’t experts in the field, like me. I wasn’t interested in translation from high-level to low-level languages at my first major’s semester (I always thought this is a very complicated topic/field), but I think I’m getting more interested in this course.

Comments

Popular posts from this blog

Ruby and the Interpreter Pattern

The Hitchhiker’s Guide to the Galaxy

Technical Overview of the CLR