This is a monorepo of my compiler projects that use LLVM. It is primarily intended to be built with Bazel, but CMake is also supported.
`coollang/` contains the frontend and runtime for COOL (Classroom Object-Oriented Language), which is a small language that still supports static typing, garbage collection, polymorphism, and dynamic dispatch.
`clang/` is the unmodified clang 15.0.7 source tree
`llvm/` is the unmodified llvm 15.0.7 source tree with the addition of optimizations I developed:
- `llvm/lib/CodeGen/RegAllocSimple.cpp` is a bottom-up local register allocator
- `llvm/lib/Analysis/UnitLoopInfo.cpp` is a natural-loop detector
- `llvm/lib/Transforms/Scalar/UnitLICM.cpp` is a loop-invariant code motion pass
- `llvm/lib/Transforms/Scalar/UnitSCCP.cpp` is a sparse conditional-constant propagation pass
Corresponding headers and tests can be found in the usual places