Think In Geek

In geek we trust

Compilers

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.

Introduction to the gfortran array descriptor

With the approval of Fortran 90, its array capabilities were largely improved. While still far from languages like APL, the extra functionality required a rethinking of the concept array in Fortran. This led to the need for array descriptors in the language.

How (not) to write a C++ front end – Part 3

In the previous installment we talked about the parsing technology we used, which looks like the canonical academic approach to parsing. In this chapter we will see some dificulties we encountered along the years.

How (not) to write a C++ front end – Part 2

In the previous installment I gave some context about the existence of Mercurium as a tool. In this chapter we will start digging into the parsing technology used.

Previous Posts