nikomatsakis ([personal profile] nikomatsakis) wrote in [personal profile] tim 2012-07-19 01:42 pm (UTC)

Dependencies

It seems to me there are three options for caching the compiled code:

- ASTs
- Generated LLVM bitcode
- Compiled code

ASTs are probably useless since most of our time is spent in trans and LLVM. Generated bitcode avoids re-running trans and avoids issues around inlining as well, but still requires that we pay the full LLVM price. Caching compiled code will, I would guess, be the most complex and result in slower executables since LLVM will not be optimizing the whole crate as a unit, though if we're doing a non-optimizing build that's obviously fine. I kind of think caching LLVM bitcode is the best "bang for our buck" but I could be persuaded otherwise.

One other comment on items vs files: in general, rustc quickly forgets the file from which code originated, so I actually think doing the caching at the level of items or modules will be the easiest.

Post a comment in response:

This account has disabled anonymous posting.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting