This directory contains the standalone FilPizlonatorPass, an LLVM instrumentation pass extracted from fil-c's forked LLVM and built as a loadable plugin against standard (unmodified) LLVM.
The pass instruments LLVM IR with InvisiCap capability checks, enabling fine-grained memory safety enforcement for the fil-c compilation pipeline.
- Standard LLVM compatibility: This plugin is built against vanilla LLVM (not fil-c's forked LLVM).
- Loadable plugin: It is produced as a
MODULE(shared library) that can be loaded into LLVM-based tools such asoptorclang. - Runtime instrumentation: The inserted checks enforce memory safety at the IR level without requiring source-level modifications.
- LLVM 16 or newer (with development headers and
llvm-config/LLVMConfig.cmake)
cd filc-llvm-pass
cmake -B build -S .
cmake --build buildAfter building, the plugin can be loaded into opt or clang.
With opt:
opt -load-pass-plugin=build/FilPizlonatorPass.so -passes=filpizlonator -disable-output < /dev/nullWith clang:
clang -fpass-plugin=build/FilPizlonatorPass.so -c your_program.cTo verify the plugin loads and registers correctly:
opt -load-pass-plugin=build/FilPizlonatorPass.so -passes=filpizlonator -disable-output < /dev/nullIf the command exits without errors, the plugin is correctly registered.