jueves, 8 de septiembre de 2016

[Discussion] Internals of GCC

Today I was listening the episode 61[1] of the Software Engineering Radio where Morgan Deters was present as a guest.

Basically Deters explains in a very general way how the GNU Compiler Collection is constructed. I only knew the very basics of gcc, mainly because I use it every time I want to compile C/C++ code but I had no idea of what the project involves. It seems to be a very robust tool that is used not only to compile C code but also can be used to compile other kind of source code in diferent programming languages.

Thanks to the podcast, now I know that GCC has three general aspects: the Front-End, Middle-End and the Back-End. It would be interesting to look at this gimple code that the Front-End uses in order to specify grammars of languages.

It maybe not be something interesting but for me it was to see the presence of the tree data structure in many parts of software. In this case it seems that every phase of the GCC reads the input and transforms it into trees so then other tool can use it and optimize things. I have not much experience working with tree data structures so I think I would need to practice a little bit.

Honestly programming at such very low levels does not catch my attention, but it would be nice to see an example of the RTL (Register Transfer Level) language.

What I mainly got from the podcast is a perspective of how much work is done in order to optmize the code. I am impressed of how the compilers can make that our code runs in many platforms and I wonder what could happend if they don't exist. I think that we would be bound to use the same machines with the same hardware and processors. As a developer I am glad that such tools exist so my life writing and running code is a lot easier than it would be without them.

[1] http://www.se-radio.net/2007/07/episode-61-internals-of-gcc/

0 comentarios:

Publicar un comentario