[analysis] Allow joining a single vector element efficiently#6071
Merged
[analysis] Allow joining a single vector element efficiently#6071
Conversation
This was referenced Nov 1, 2023
Member
Author
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
kripken
approved these changes
Nov 1, 2023
| Element getTop() const noexcept | ||
| #if __cplusplus >= 202002L | ||
| requires FullLattice<L> | ||
| #endif |
Member
Author
There was a problem hiding this comment.
This wasn't pulling its weight, complexity-wise, so I removed it as a drive-by.
456aa3c to
350ba10
Compare
b315131 to
8a7936d
Compare
350ba10 to
838bfac
Compare
Previously, modifying a single vector element of a `Shared<Vector>` element required materializing a full vector to do the join. When there is just a single element to update, materializing all the other elements with bottom value is useless work. Add a `Vector<L>::SingletonElement` utility that represents but does not materialize a vector with a single non-bottom element and allow it to be passed to `Vector<L>::join`. Also update `Shared` and `Inverted` so that `SingletonElement` joins still work on vectors wrapped in those other lattices.
8a7936d to
ecd665e
Compare
radekdoulik
pushed a commit
to dotnet/binaryen
that referenced
this pull request
Jul 12, 2024
…mbly#6071) Previously, modifying a single vector element of a `Shared<Vector>` element required materializing a full vector to do the join. When there is just a single element to update, materializing all the other elements with bottom value is useless work. Add a `Vector<L>::SingletonElement` utility that represents but does not materialize a vector with a single non-bottom element and allow it to be passed to `Vector<L>::join`. Also update `Shared` and `Inverted` so that `SingletonElement` joins still work on vectors wrapped in those other lattices.
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.

Previously, modifying a single vector element of a
Shared<Vector>elementrequired materializing a full vector to do the join. When there is just a single
element to update, materializing all the other elements with bottom value is
useless work. Add a
Vector<L>::SingletonElementutility that represents butdoes not materialize a vector with a single non-bottom element and allow it to
be passed to
Vector<L>::join. Also updateSharedandInvertedso thatSingletonElementjoins still work on vectors wrapped in those other lattices.