← All repos

grin

GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.

compilerdata-flow-analysisfunctional-programminghaskellllvmoptimisation
Browse cluster: Cosmos blockchain and smart contract languages
1,947commits
20contributors
9languages

Tech stack & purpose

GRIN, which stands for Graph Reduction Intermediate Notation, is a compiler back-end for lazy and strict functional languages that includes whole program optimization support. It serves as the optimizer and code generator component of the GRIN Compiler project, which provides language frontends for Haskell, Idris, and Agda. The project is built in Haskell and compiles to LLVM, implementing numerous data-flow analysis and optimization transformations including vectorization, case elimination, copy propagation, inlining, unboxing, and dead code elimination. The work is supported by individual backers including Sam Griffin and Holmusk.

Community & reference links

Languages

Haskell
86.6%
LLVM
4.4%
Assembly
4.4%
C++
2.3%
TeX
0.9%
C
0.8%
Nix
0.5%
Roff
0.1%
Shell
0.0%

Contributors