-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP evolving the IR #15181
WIP evolving the IR #15181
Conversation
jl_svec_t *local_syms, | ||
jl_svec_t *local_vals) | ||
JL_DLLEXPORT jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, | ||
jl_lambda_info_t *lam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to assume that local_vals == lam->sparam_vals
, but that is false for the LambdaInfo reached at LambdaInfo->unspecialized
and LambdaInfo
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will add another argument for this.
1269902
to
2e1de81
Compare
I'm excited for the macro dispatch opportunities this will provide! |
this stage happens after the macro expansion |
@JeffBezanson might that be a good time to also have varinfo be some kind of type with proper field names so that part of all the magic indices everywhere can go away ? not hugely important but might be a nicety along the way |
@carnaval Yes, that's on the list, but I was thinking of using 3 arrays indexed by slot number. That way the flags can be a UInt8 array. |
Ok, things are passing, except for one test where the interpreter doesn't yet know the names of local variables, which is expected. The system image build is about 50 seconds faster than master, so this is promising. |
6788698
to
1061f1d
Compare
1061f1d
to
486286a
Compare
Wow, 50 seconds. Just fantastic work you folks are doing to improve the core infrastructure. |
this avoids needing to repeatedly look up labels when interpreting or analyzing code.
wrap static parameters with (static-parameter ) start renaming `jlgensym` to `val` (ssa value)
6f1abd8
to
2119e87
Compare
LambdaInfo.ast is now LambdaInfo.code, and is just an array of statements store LambdaInfo objects in the tfunc cache, instead of just ASTs remove some arguments to jl_type_infer and typeinf ensure every specialization has a new LambdaInfo; before we sometimes erroneously mutated the original LambdaInfo for a definition
This represents local variables as
Slot(i)
instead of symbols, making parts of the compiler simpler and hopefully faster. Also helps the interpreter.Status: builds a working system image, but only with inlining disabled. Inlining pass seems not to fully work yet.cc @vtjnash @carnaval
Remaining steps:
Slot
objects, and the vast majority ought to be shared like GenSyms are.