Repository navigation
perf(sv): find multi-store candidates through condensed block components - #1990
Merged
Merged
Conversation
Closes #1988 Change-Id: Id174035327e6e49871ff41babe63eb7724cb9736
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Merge Queue Status
This pull request spent 40 minutes 50 seconds in the queue, including 39 minutes 12 seconds running CI. Required conditions to merge
|
40 of 71 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1988.
Summary
multi_write_candidates(crates/celox-frontend-core/src/watch.rs) walked every block reachable from each write to look for another write of the same key. That made it quadratic or worse in the unit size, and on C906ff_multi_storedspends minutes in it.It now:
Keys written only once in the unit skip the bit sets: such a key is a candidate only around a loop. The result is the same list in the same order (first qualifying write by block id, then position), so every caller (
multi_store_candidates,multi_store_only_candidates, the SV lowering and SDK callers) gets the speedup with unchanged diagnostics and lowering.Tests
candidates_match_a_walk_from_every_write: keeps the old walk as a reference and compares it with the new function on 5000 generated units. The units have sparse block ids, forward and backward edges (loops, self loops), edges to missing blocks, returns, jumps, branches and switches, and stores, commits and other instructions.candidates_beyond_one_chunk_of_keys_are_found: 5000 multiply written keys, more than one chunk of the bit sets.Per the decision for complexity-order fixes, no timing or callgrind comparison was run.