Jul 20, 2023

Graph-based SSA intermediate representation library for compilers

The Firm library implements the Firm intermediate representation IR. libFirm contains algorithms for construction of the SSA form directly from the attributed syntax tree. A set of analyses and optimisation phases is provided. This version includes a complete backend for the IA32 architecture, as well as some unfinished backends for SPARC, ARM

  • support for object oriented type hierarchies
  • analyses dominance, loop tree, execution frequency, control dependencies, call graph, rapid type, def-use, alias analysis, class hierarchy analysis
  • Optimisations constant folding, local common subexpression elimination, global common subexpression elimination, code placement, operator strength reduction, scalar replacement, load/store, control flow optimisations, if-conversion, partial condition evaluation, reassociation, tail recursion elimination, inlining, procedure cloning, dead code elimination, …
  • enhanced debugging support extensive checkers, breakpoints on node creation, entity creation, graph dumping
  • lowering of intrinsics, double word arithmetics, bitfields
  • backend with SSA based register allocation including several algorithms for spilling and copy coalescing. Instruction and block scheduling, support for ABI handling.
  • working ia32 backend with support for x87 and SSE2 floating point
  • handwritten recursive descent C90/C99 frontend available lang/cparser

Checkout these related ports:
  • Zziplib - Library to provide transparent read access to zipped files
  • Zydis - Fast and lightweight x86/x86-64 disassembler library
  • Zycore-c - Support library with platform independent types, macros, etc for Zydis
  • Zthread - Platform-independent object-oriented C++ threading library
  • Zookeeper - Coordination Service for Distributed Applications
  • Zls - Zig LSP implementation + Zig Language Server
  • Zfp - High throughput library for compressed floating-point arrays
  • Zeal - Offline documentation browser
  • Zapcc - C++ caching compiler based on clang
  • Zanata-platform - Web-based translation platform
  • Zanata-cli - Zanata Java command line client
  • Z88dk - Complete Z80/Z180 development kit
  • Z80ex - ZiLOG Z80 CPU emulator library
  • Z80asm - Assembler for the Z80 microprocessor
  • Z80-asm - Z80 assembly code assembler and disassembler