Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coord-e/ccc
optimizing compiler for a subset of C language
https://github.com/coord-e/ccc
c compiler optimization
Last synced: 9 days ago
JSON representation
optimizing compiler for a subset of C language
- Host: GitHub
- URL: https://github.com/coord-e/ccc
- Owner: coord-e
- License: mit
- Created: 2019-06-28T03:10:44.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2019-10-07T13:27:18.000Z (about 5 years ago)
- Last Synced: 2024-10-11T05:10:46.328Z (26 days ago)
- Topics: c, compiler, optimization
- Language: C
- Homepage:
- Size: 736 KB
- Stars: 34
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ccc
[![Build Status](https://travis-ci.com/coord-e/ccc.svg?branch=develop)](https://travis-ci.com/coord-e/ccc)
a work-in-progress compiler for a tiny subset of C language.
ccc is intended to be an optimizing compiler that produces code which is faster than gcc -O1 does, and compiles faster than that.
## Roadmap
- [ ] support C11 features
- [x] arithmetic operations
- [x] pointer arithmetic
- [x] arrays
- [x] type checker
- [ ] support type qualifiers
- [x] implicit type conversions
- [ ] initializers
- [x] scalar
- [x] array
- [ ] struct
- [ ] designated initializers
- [ ] a copy of struct
- [x] local assignment
- [ ] argument
- [ ] return value
- [ ] preprocessor
- [ ] self-hosting
- [ ] complex declarators
- [ ] alignment specifiers
- [ ] float-point values
- [ ] optimizations
- [x] linear scan register allocation
- [x] naive mem2reg
- [x] constant folding
- [x] copy propagation
- [x] dead code elimination
- [ ] tail call optimization
- [ ] loop unwinding
- [ ] misc
- [ ] improved error messages
- [ ] better support of debuggers
- [ ] support targets other than x86_64## Development
To build ccc, run:
```shell
make
```You'll see a compiled binary under `./build/`.
You can add `DEBUG=0` to get an optimized build of `ccc`.
To run tests, use `test` target:
```shell
make test
```