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
Very WIP: Stage2 revival #78
Conversation
|
Alright, I think at this point, I've proven out that all the compiler interfaces do now support what we need. I think the big next thing here is to unify the codegen between stage1 and stage2 and then rewrite the stage2 inference support to be less awful, but I think there's a reasonably clear path here. |
function abstract_call_gf_by_type(interp::ADInterpreter, @nospecialize(f), argtypes::Vector{Any}, @nospecialize(atype), sv::InferenceState, max_methods::Int = InferenceParams(interp).MAX_METHODS) | ||
if f isa ∂⃖ | ||
function Core.Compiler.abstract_call_gf_by_type(interp::ADInterpreter, @nospecialize(f), | ||
arginfo::ArgInfo, @nospecialize(atype), sv::InferenceState, max_methods::Int) |
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.
arginfo::ArgInfo, @nospecialize(atype), sv::InferenceState, max_methods::Int) | |
arginfo::ArgInfo, @nospecialize(atype), sv::InferenceState, max_methods::Int = InferenceParams(interp).MAX_METHODS) |
# This is a lie, but let's clean this up later | ||
Cthulhu.can_descend(interp::ADInterpreter, mi::MethodInstance, optimize::Bool) = true | ||
|
||
function Cthulhu.lookup(interp::ADInterpreter, curs::ADCursor, optimize::Bool; allow_no_src::Bool=false) |
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.
function Cthulhu.lookup(interp::ADInterpreter, curs::ADCursor, optimize::Bool; allow_no_src::Bool=false) | |
function Cthulhu.lookup(interp::ADInterpreter, curs::ADCursor, optimize::Bool) |
No need to overload the kwarg method (it's only used in the Cthulhu test suite).
# This is a lie, but let's clean this up later | ||
Cthulhu.can_descend(interp::ADInterpreter, mi::MethodInstance, optimize::Bool) = true | ||
|
||
function Cthulhu.lookup(interp::ADInterpreter, curs::ADCursor, optimize::Bool; allow_no_src::Bool=false) |
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.
We also need to overload Cthulhu.lookup_constproped(interp::AbstractInterpreter, curs::AbstractCursor, override::InferenceResult, optimize::Bool)
to support constprop'ed callsite.
My plan is to merge this without hooking this up and then to continue working on this on main. |
0f62b21
to
33a6f64
Compare
Codecov ReportBase: 54.41% // Head: 50.21% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
- Coverage 54.41% 50.21% -4.21%
==========================================
Files 22 23 +1
Lines 2161 2350 +189
==========================================
+ Hits 1176 1180 +4
- Misses 985 1170 +185
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Needs some corresponding changes in Cthulhu