Internals of GCC
Basically,
this podcast talks about the internal implementation of GCC as a compiler that
is able to compile from languages such as java, c, c++ and how it does it. Morgan
Deters, who is a compiler programmer with a PHD says that it is flexible
because of its modularity. The front end, middle and back end are modules that
work together but are architecture and language independent, so it can translate
from one language to another (assembler) using the steps of compilers design
that we’ve seen in classes without being specific about the language.
Morgan says
that the compiler can crash in runtime if we do not make the programs properly because
even though it has lexical and syntax analysis to prevent that, it’s impossible
to do it perfectly.
He says
that the importance of compilers programming is about performance because there
are many ways to translate from one language to another but the way we do it
defines if its performance improves or goes down. He talked so much about trees
that define the functions, operations, variables and other elements of the
program that let the compiler make decisions to optimize the processes. It all depends
on the levels of representations that the language has.
I didn’t understand
at all when Morgan talked about optimization using registers, he says that the
compilers assumes that he has many of them and uses them as much as he can to
optimize processes. But I believe that there should be some kind of control to
use those registers and memory.
He also
talked about something called the RTL that has a way to translate some
instructions directly to assembly. It matches the instructions in a language
such as a sum with the defined instructions in machine code so the gcc is able
to translate it easily, more optimized.
Comentarios
Publicar un comentario