Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the basic skeleton for the compiler (#74)
* Implement the skeleton of a pass infrastructure While it is incomplete, an initial skeleton for the pass management infrastructure ensures that we do not paint ourselves into any corners that might be hard to design our way out of later. It provides the infrastructure for creating and managing passes, as well as shuffling pass data between passes. Please note that this we make use of self-referential structs via Ouroboros to better encapsulate the LLVM context and the modules that exist in it. Added `libffi` and `libxml2` as build and runtime dependencies to the project as these are required by inkwell now that it is actually in use. This fixes an issue preventing compilation in tests. * Implement the module mapping pass This pass runs an analysis of LLVM modules to resolve all top-level entities. The results are written out as pass data, and are intended for use as part of a consistency check during the compilation to FLO. As part of implementing this pass, this commit also implements: - A proxy for the portions of the LLVM type system that we support, enabling us to do pre- and during-compilation consistency checking where necessary. - A parser for LLVM's data-layout specifications, allowing us to ensure that the provided modules are not making any assumptions that would be unsafe for our target machine. * Miscellaneous fixes and updates This commit performs a number of small miscellaneous refactorings and fixes in response to looking at the code with a fresh set of eyes. It also accounts for feedback given during code review.
- Loading branch information