Improve tile representation - #291
Merged
Merged
Conversation
Use the release containing the CFG structurization fixes needed by the new branch and tuple-flow regressions.
Keep invalid zero-volume intrinsics visible to their emitters, reject empty tiles at kernel boundaries, and carry compiler ghosts through structured control flow without creating Tile IR values.
Replace the fieldless mutable identity object with a one-byte immutable handle. The payload is never observed; it only prevents singleton folding while Tile IR carries the actual value.
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.
In #290 I introduced the concept of "empty tiles", i.e., tiles with a 0 extent. Ideally this shouldn't be necessary, and the type would be a ghost type because of its size being zero. However, our
Tiletype doesn't really have fields, and is currently a mutable type to avoid becoming a singleton. I experimented with making it immutable giving it a fictitious field (necessitating a length typevar a la StaticArrays since Julia doesn't support computed field tiles) so that Julia's understanding of the struct's layout matches what we need, but that seemed questionable: alltfuncs needed to be made aware of that additional typevar, and unused fields are pretty questionable.So instead I reverted all of that and kept the bugfixes and improvements I collected along the way, alongside with one simplification: make Tile a primitive type instead of a mutable one. We retain the quirk that both zero-size objects and tiles with a zero extent (again, not actually represented as a zero-size object, see previous paragraph) generate ghost values during compilation, but I don't see an easy way around that.