FCC is a optimizing compiler for a (growing) C99 subset.
Build:
./bd
Run tests:
python tests.py
Use:
./build/fcc test.c
Requirements:
- CMake
- clang (22.1.8)
- clang development libraries
- graphviz (15.1.0)
- mold (optional)
- python
- Constant Folding
- Dead Branch Elimination
- Dead Block Elimination
- Constant Hoisting
- Dead Definition Elimination
- Block Merge
- Function declarations and definitions
- Function calls
- Variable declarations
- Variable assignment
- SSA variable reads / writes with phi insertion
+=-=*=/=%=
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
/) - Modulus / Remainder (
%)
- Less than (
<) - Less than or equal (
<=) - Greater than (
>) - Greater than or equal (
>=) - Equal (
==) - Not equal (
!=)
- Unary plus (
+x) - Unary minus (
-x) - Logical NOT (
!x) - Increment (pre & post)
- Decrement (pre & post)
- Logical AND (
&&) - Logical OR (
||)
ifif-elsewhileforbreakcontinue