-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[Compiler] fix some cycle_fix_limited usage #57545
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
Conversation
Recompute some O(n) things a bit less on every statement. Fix an assert that ensured LimitedAccuracy does not accidentally get preserved when it should have been deleted: the (local) cache should not contain things that are marked as dead (RIP), as that was leading to much code not getting cached when it logically should have. Simplify the computation of frame_parent when the cycle_parent isn't needed.
nargtypes = length(given_argtypes) | ||
for cached_result in cache | ||
cached_result.linfo === mi || @goto next_cache | ||
cached_result.tombstone && continue # ignore deleted entries (due to LimitedAccuracy) |
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.
FWIW: this is the bugfix, the rest is various improvements of various sorts
n.b. the LimitedAccuracy object does not need to contain a Set anymore, since all of the nodes now have a frameid::Int
, which is reliable and strongly ordered, so we could now build the lattice over the frameid value instead, which may be much simpler.
Recompute some O(n) things a bit less on every statement. Fix an assert that ensured LimitedAccuracy does not accidentally get preserved when it should have been deleted: the (local) cache should not contain things that are marked as dead (RIP), as that was leading to much code not getting cached when it logically should have. Simplify the computation of frame_parent when the cycle_parent isn't needed. (cherry picked from commit 0366a2a)
* Adapt to JuliaLang/julia#57545 * Adapt to JuliaLang/julia#57545 * Fixes * Bump version * Add tighter version checks * Revert accidental edit * Simplify version checks --------- Co-authored-by: Cédric Belmant <cedric.belmant@juliahub.com>
frames = sv.callstack::Vector{AbsIntState} | ||
causes = typ.causes | ||
for frameid = cycleid:length(frames) | ||
caller = frames[frameid]::InferenceState |
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 throws BoundsError
, #57634
Recompute some O(n) things a bit less on every statement. Fix an assert that ensured LimitedAccuracy does not accidentally get preserved when it should have been deleted: the (local) cache should not contain things that are marked as dead (RIP), as that was leading to much code not getting cached when it logically should have. Simplify the computation of frame_parent when the cycle_parent isn't needed.
Recompute some O(n) things a bit less on every statement. Fix an assert that ensured LimitedAccuracy does not accidentally get preserved when it should have been deleted: the (local) cache should not contain things that are marked as dead (RIP), as that was leading to much code not getting cached when it logically should have. Simplify the computation of frame_parent when the cycle_parent isn't needed.