Compiler projects using llvm
README.md

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 on an best-effort basis. This code is compiled from various projects, and certain things are known to not work (tests have not yet been ported, some LLVM passes are not registered yet, etc.)

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