Cpylier is a C Compiler written in Python.
- Parsing & AST Generation
- Reads source code
- Generates Abstract Syntax tree
- Semantic Analysis
- Type checking & Scope Validation of AST
- LLVM IR Generation
- Converts AST to LLVM Intermediate Representation
- Sets target triple dynamically.
- User chosen Execution modes
- JIT Execution - Runs IR directly with LLVM JIT
- IR Output - Outputs IR
- Clang Compilation - Compiles IR to executable
- C Language features
- Variables & Assignments
- Conditionals
- Loops
- Function Calls
- Structs & Pointers
- C Standard Library
- Backend Improvements
- Generate ASM instead of IR
- Custom x86_64 backend to replace Clang
- IR Optimisations
- Constant Folding
- Dead Code Elmination
- Loop Unrolling
- Function Inlining
- LLVM Optimsation Passes
- Debugging/Error Handling
- Syntax Error reporting
- Semantic Error detection
- AST Pretty-Printing
- Ahead of Time Compilation
- Custom Object File Generator
- Customer Linker
- Multi-File Compilation
- Multiple files
- Support include statements
- Support variables, conditionals, loops
- Improve error handling
- Constant folding, dead code elmination
- Multi-File Compilation
- Assembler Backend