domingo, 10 de febrero de 2019

Internals of GCC

After listening to the podcast called "Internals of GCC" by Software Engineering Radio with Morgan Deters as guest, I can say that I was impressed by all the work done the developers of compilers. I truly think that people, or at least programmers, should be more interested in how a compiler works, because as they say in the talk, we all want our programs to run efficiently in modern computers, even when it is not necessary for a developer to worry about all the internal details involved in the compilation, it would be good in my opinion, to know at least superficially what this process does.

On the other hand, I also found interesting what was talked about the gnu compiler collection (gcc) which is basically a Collection of compiler framework, that is very portable and flexible, because it is used in Windows, MacOS and other systems operatives.

To achieve its objective, the podcast says that gcc internal is very modular, since it is composed of a language specific front end, a middle end and a back end.

The language specific front end (which can interchange between different languages ​​such as c ++ and java) acts as a black box and takes the given input in a plain text file or a source code, and so the form to a standard tree (AST) and it makes it generic. Then the middle end takes the generic tree from the front end and optimizes it to convert it into the RTL tree form (register-transfer language). Finally the backend takes the RTL and from it generates the machine code.

It seems to me a marvelous job that a single framework is compatible with so many systems and languages, and I think that the importance of knowing about compilers lies in this, because thanks to the techniques used, it is possible to translate the programming language into a Machine language on many different platforms and efficiently.

No hay comentarios.:

Publicar un comentario