Think In Geek

In geek we trust


Walk-through flang – Part 8

In the last installment of this series we started to look at the AST and the symbol table by examining the compiler dumps of these two data structures. In this chapter we are going to explore a bit more the AST for the control flow statements.

Walk-through flang – Part 7

In previous chapters we saw how the input source was lexed, parsed and semantically analysed and we looked at how the symbols and data types are represented. But we haven’t looked at what happens once the semantic analysis finishes. In this installment we’re going to talk about the AST.

Walk-through flang – Part 6

At this point we should have a reasonable picture of how flang parses and generates semantic information. So now it is time to explore with more detail what is actually synthesized and how it can be used later in the compiler. In this chapter we are going to see the symbol table.

Walk-through flang – Part 5

In the previous installment of this series we saw how flang parses the statements using an LR(1) algorithm. As the parser recognized the parts of the statements it invokes semantic actions. Today we’re going to talk more about them.

Walk-through flang – Part 4

In the last installment we saw how flang splits the input in tokens. Once we have the tokens identified we need to parse them.

Walk-through flang – Part 3

In the last chapter we saw how the driver handles the compilation and how it invokes flang1 and flang2. In this chapter we are going to start with flang1.

Walk-through flang – Part 2

In the previous installment of this series we saw basically how to install flang and we ran a simple smoke test. In this post we will see a high level overview of what happens when we compile a Fortran program using flang. We will also compare it with what usually happens with clang.

Walk-through flang – Part 1

Flang is an open source project to create a Fortran compiler for LLVM. It is based on NVIDIA/PGI Fortran and it has been released under Apache License 2.0. In this series we will do a walk-through the code of this compiler and how it has been integrated in the existing LLVM infrastructure.

Compilers as a memory error detectors

This is a small anecdote of something that happened me the other day.

Whose is this optimization?

Today we will toy around a very simple optimization in clang and discuss a bit about separation of concerns when optimizing code.

Previous Posts