Compiler Design Add support of Debugging: DWARF, Functions, Source locations, Variables In this article, we continue to discuss other aspects involved with debugging and debugging information in Kaleidoscope. We discuss how to include function definitions, source locations, and variable locations in debug information.
Compiler Design Building a Compiler Front-End The front-end of a compiler comprises four phases, source code is converted from high-level code to an intermediate representation which is optimized and compiled to machine code.
Compiler Design Add debugging support in Programming Language A good programming language should also be able to support debugging and debug information. In this article, we add support for debugging and debug information.
Compiler Design Bootstraping a Compiler Bootstrapping a compiler involves producing a self-compiling compiler, that is, we write a compiler using language A that produces code for target machine B and can still compile itself.
Compiler Design Compiling LLVM IR to Object Code We have seen how to implement the Kaleidoscope programming language, from source code to an LLVM IR to optimization to implementing a JIT compiler and implementing further extensions. In this article, we will compile the LLVM IR into object code.
Compiler Design Variable Mutation in Kaleidoscope Mutation in programming languages involves the ability to change an object. In this article, we further extend our language, we add to it the ability to define new variables and mutate them.
Compiler Design How to compile a compiler? [Bootstrapping] In this article, we will learn the process and types of bootstrapping. Bootstrapping involves using compilers to compile other compilers or themselves.
Compiler Design LLVM Memory and SSA In this article, we learn all about SSA and LLVM memory and how the two are related.
Compiler Design User-defined Operators in Kaleidoscope User-defined operators take in a set of operands as input and return a result. We want to support functionalities such as division, logical negation, comparisons, etc.
Compiler Design If-then-else in LLVM Control Flow Control flow statements are statements used to change the flow of execution of the program. In this article, we extend Kaleidoscope to include control flow operations such as if-then-else statements.
Compiler Design For loops in LLVM Control Flow In programming, we use loops to repeat a sequence of instructions until a specified condition is met. In this article, we further extend Kaleidoscope to support for loops.
Compiler Design Implementing JIT (Just In Time) Compilation JIT(Just in Time) compilation involves transforming bytecode into machine executable instructions bytecode. In this article, we will implement a JIT to our Kaleidoscope interpreter.
Compiler Design LLVM Compiler Optimization Code optimization transforms an LLVM IR to code that consumes fewer resources such as memory. In this article, we will learn how to apply different compiler optimizations to the LLVM IR produced.
Compiler Design Constructing a Parser in Compiler Design In this article we will be constructing a recursive descent parser for the Kaleidoscope programming language.
Compiler Design Compiler Front-end: Building a lexer We will build a lexical analyzer for the Kaleidoscope programming language which converts source code into tokens. This is the first program to interact with the source during compilation.
Compiler Design LLVM: IR, Assembly, SSA This is an introduction to LLVM intermediate code which is low level but still human-readable along with Assembly and Static Single Assignment (SSA).
Compiler Design MCQs on Compiler Design This is a listing of 50+ Multiple Choice Questions on Compiler Design.
Compiler Design Code Generation from AST to LLVM IR In this article, we will learn how to transform an AST(Abstract Syntax Tree) into an LLVM IR(Intermediate Representation).
Compiler Design Create AST nodes using LLVM In this article, we learn how to build a class hierarchy that represents different AST nodes in a programming language whereby the node type has a class where the name of the class represents a syntax element of the programming language.
Compiler Design Machine dependent optimizations Code optimization in compiler design is grouped into two major optimization techniques. These are machine-independent and machine-dependent. In this article, we learn about optimization involving the underlying machine.
Compiler Design Control flow in Intermediate Code Generation During the construction of the front end of a compiler, we implement statements using control flow. We translate the statements by inheriting a label next that marks the first instruction after the code for this statement.
Compiler Design Types and Declarations in Intermediate Code Generation In this article, we learn about types and the storage layouts for names declared within a procedure or class which are allocated at run time when the procedure is called or an object is created.
Compiler Design Evaluation Orders for SDDs In this article, we learn about evaluation orders fpr syntax-directed definitions. Dependency graphs are used to determine an evaluation order for instances of attributes in a parse tree.
Compiler Design Syntax-Directed Translation Schemes In this article, we learn about syntax-directed translation schemes, a complementary notation to syntax-directed definitions.
Compiler Design Applications for Syntax-Directed Translation In this article, we learn about the main application of Syntax-directed Translation which is the construction of syntax trees.