Fil-C

Memory SafetyC/C++ CompatibilityModern Tooling

Fil's Unbelievable C Compiler

Fil-C is a fork of clang 20.1.8 that includes:

The FilPizlonator

This pass applies memory safety rules to every single construct in LLVM IR, including:

FilPizlonator will turn code into an always-panic if it doesn't know how to check it. If the code is particularly evil, FilPizlonator will simply crash and refuse to compile.

FilPizlonator also has extensive support for accurate GC, including:

FilPizlonator started out as a zero-optimizations, instrument-everything-with-function-calls style, since I wasn't even sure if the technique would conceptually work out. Since it did work out, many optimizations have been added:

The Fil-C Pass Pipeline

Below is a graphic showing the Fil-C pass pipeline.

Fil-C pass pipeline

Fil-C reuses the LLVM pass pipeline after FilPizlonator, and also runs a mini version of that pipeline before FilPizlonator. The pre-pizlonating passes achieve: