×
Home Discussions Write at Opengenus IQ
×
  • About
  • Track your progress
  • Deep Learning Projects
  • Python Projects
  • Join our Internship 🎓
  • RANDOM
  • 100+ Graph Algorithms
  • 100+ DP Problems
  • 50+ Linked List Problems
  • 50+ Array Problems
  • One Liner
  • 50+ Binary Tree problems
  • Home
  • Rust Projects

Compiler Design

Compiler Design is the study of designing efficient compilers that convert code in a High Level Programming Language to Machine level code. It is one of the most important subjects to design efficient code.

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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
Compiler Design

LLVM Memory and SSA

In this article, we learn all about SSA and LLVM memory and how the two are related.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
Compiler Design

Constructing a Parser in Compiler Design

In this article we will be constructing a recursive descent parser for the Kaleidoscope programming language.

Erick Lumunge
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.

Erick Lumunge
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).

Erick Lumunge
Compiler Design

MCQs on Compiler Design

This is a listing of 50+ Multiple Choice Questions on Compiler Design.

Erick Lumunge
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).

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
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.

Erick Lumunge
Compiler Design

Syntax-Directed Translation Schemes

In this article, we learn about syntax-directed translation schemes, a complementary notation to syntax-directed definitions.

Erick Lumunge
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.

Erick Lumunge
OpenGenus IQ © 2023 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter