Kefir C17/C23 Compiler
5 hours ago
- #Compiler
- #Open-source
- #C programming
- Kefir is an independent C17/C23 compiler developed by Jevgenij Protopopov, validated with over 100 software projects including GNU tools, Curl, and OpenSSL.
- It targets x86_64 architecture with System-V AMD64 ABI, supporting Linux, FreeBSD, NetBSD, OpenBSD, and DragonflyBSD, and includes features like SSA-based optimization and debug info generation.
- The compiler provides a cc-compatible command-line interface, acting as a near-drop-in replacement, but is maintained by a single person with limited support for production use.
- Kefir supports _Decimal floating-point numbers (via libgcc) and atomic operations (via libatomic), with dependencies on system toolchains and optional libraries.
- It features a structured compilation pipeline with multiple intermediate representations, including stack-based IR, optimizer SSA, memory SSA, and target-specific IRs for x86_64.
- Kefir includes optimization passes at -O1 level, such as mem2reg, GVN, and LICM, and generates DWARF-5 debug information.
- Testing involves own tests, reproducible bootsraps, external test suites from 100 projects, and random csmith cases, with daily and pre-release validation.
- The project is open-source under GNU GPLv3 (with BSD-licensed runtime parts), developed in a cathedral model, and source code is available via Git mirrors and release tarballs.