LLVM backend: separate extraction and compilation
Open
Nobody has claimed this yet.
P-low
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
This can be done in several stages towards the behavior of the C backend:
- emit unoptimized
.bcfile, use separate build step to produce.ofile in order to increase parallelism - implement short-circuiting: do not recompile
.oif.bcand all relevant files/binaries are unchanged ("local ccache of size 1"); this would need to be done in both the Makefile and Lake - when step 2 is sufficiently sound, cache and restore .bc+.o files in CI; at this point, we should effectively have reached the level of recompilation avoidance of the C backend
- get even closer to ccache; a content-addressed store for Lake could achieve this
4 is nice-to-have; 2 would be sufficient for enabling the backend for users, 3 for building Lean with the backend
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the LLVM backend build flow and the Makefile and Lake configuration, then compare the C backend's extraction and compilation behavior. The first milestone is a separate .bc emission and .o compilation step; later milestones cover unchanged-input checks and CI caching of .bc and .o files.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, ci-cd, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100