Skip to content

Latte is a compiler for a Java-like programming language written in Haskell. The compiler generates LLVM code in Single Static Assignment (SSA) form, enabling multiple optimizations for efficient execution.

Notifications You must be signed in to change notification settings

AnthonyGrod/LATTE

Repository files navigation

Latte LLVM Compiler

Overview

Latte is a compiler for a Java-like programming language, Latte (language reference), written in Haskell. The compiler generates LLVM code in Single Static Assignment (SSA) form, enabling multiple optimizations for efficient execution.

Features

  • Written in Haskell: The compiler leverages Haskell's strong type system and functional programming capabilities.
  • LLVM Backend: Generates LLVM intermediate representation in SSA form for high-performance execution.
  • Optimizations: Several optimizations are implemented to improve efficiency, including:
    • Lowest Common Ancestor Elimination: Reduces redundant computations by eliminating unnecessary common subexpressions.
    • While Loop Strength Reduction: Optimizes loop computations by replacing expensive operations with cheaper ones.
    • Constant Propagation and Folding: Evaluates and simplifies constant expressions at compile time.

Usage

To build and run the compiler, use the following commands:

make
./latc <source_file>

About

Latte is a compiler for a Java-like programming language written in Haskell. The compiler generates LLVM code in Single Static Assignment (SSA) form, enabling multiple optimizations for efficient execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages