https://github.com/xqb64/ucc Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} xqb64 / ucc Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 15 An optimizing compiler for a large subset of the C programming language License MIT license 15 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights xqb64/ucc master BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 570 Commits src src tests @ 34426cb tests @ 34426cb .gitignore .gitignore .gitmodules .gitmodules Cargo.lock Cargo.lock Cargo.toml Cargo.toml LICENSE LICENSE README.md README.md View all files Repository files navigation * README * MIT license ucc This is a Rust implementation of the C compiler from Nora Sandler's book. How it works At the forefront is the compiler driver, which orchestrates the compilation process---from lexing and parsing, through several stages of semantic analysis, such as variable resolution, loop labeling, and type checking. After generating an intermediate representation (IR), the compiler passes it through an iterative optimization pipeline. This pipeline leverages forward and backward data-flow analysis, liveness analysis, and address-taken analysis to implement optimizations such as constant folding, unreachable code elimination, copy propagation, and dead store elimination. Finally, it generates and optimizes the x86_64 assembly code using a graph coloring-based register allocator with conservative coalescing, before emitting the optimized code. Status * [*] char (in both unsigned and signed variants) * [ ] short * [*] int (in both unsigned and signed variants) * [*] long (in both unsigned and signed variants) * [ ] float * [*] double * [*] void * [*] if/else * [ ] switch * [*] while * [*] do while * [*] for * [*] break * [*] continue * [ ] ConsideredHarmful * [*] static * [*] extern * [*] arrays * [*] structs * [*] sizeof * [ ] enums * [ ] unions * [ ] typedef License Licensed under the MIT license. About An optimizing compiler for a large subset of the C programming language Resources Readme License MIT license Activity Stars 15 stars Watchers 2 watching Forks 0 forks Report repository Releases No releases published Packages 0 No packages published Languages * Rust 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.