Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write LIR documentation explaining design constraints. #25

Open
nbp opened this issue Mar 28, 2018 · 0 comments
Open

Write LIR documentation explaining design constraints. #25

nbp opened this issue Mar 28, 2018 · 0 comments
Assignees

Comments

@nbp
Copy link
Owner

nbp commented Mar 28, 2018

Currently, it might seems opaque to a lot of persons why will HolyJit should use its own LIR representation instead of relying on LLVM IR or directly targeting Cretonne for doing transformations on the code extracted from the MIR.

The problem with existing projects is that it is hard to retro-fit new constraints on an existing compiler without rewriting large parts of the compiler.

In order to avoid mistakes our-self, we should explicit and document the constraints that we want on the LIR, on analysis and on transformation phases before implementing of it. The core idea is that HolyJit should be optimized for re-compilation.

Optimizing for re-compilation means that the compiler should minimize the time needed to re-compile after a de-optimization which invalidated the previously optimized code. This comes from the conclusion that the cost of a de-optimization is proportional to the cost of the re-compilation. Reducing the de-optimization cost implies that we can afford to do more speculative optimization, reducing the need for proves in the compiler in the early tiers of the JIT compiler.

@nbp nbp self-assigned this Mar 28, 2018
@nbp nbp added this to the v0.1.0: Cranelift + LIR milestone Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant