cfg: reuse original ControlRegions as much as possible during structurization.#55
Merged
cfg: reuse original ControlRegions as much as possible during structurization.#55
ControlRegions as much as possible during structurization.#55Conversation
478a889 to
d042cb8
Compare
6b5bfc6 to
d106013
Compare
fornwall
previously approved these changes
Jan 31, 2024
d106013 to
bb882bb
Compare
fornwall
previously approved these changes
Jan 31, 2024
The merge-base changed after approval.
bb882bb to
b380a7c
Compare
b380a7c to
9fa349c
Compare
fornwall
approved these changes
Jan 31, 2024
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.
Original motivation back when I first started this refactor was this bug:
Progress stalled back then and I only revived the branch for the Vulkan layer (#53), because trying to run the Vulkan CTS with the SPIR-T layer would run into:
OpSpecConstantOpsupport (already implemented in the Vulkan layer branch)list_eq_keypanics (fixed by this PR)OpTypeForwardPointersupport (not implemented yet, but it's much rarer and only used withPhysicalStorageBufferpointers, since logical pointers don't allow recursive data types in the first place)On top of unblocking the SPIR-T Vulkan layer for in-depth testing, this refactor, out of necessity of not introducing even more spurious unused
bools, makes the existing ones as lazy as possible (within the limits of what the structurizer knows without adding more analysis passes).You can see in the
README.mdexample, that this PR removes both extraneousbools (for "doesbreak" vs "doesn'tbreak"), and instead the original condition (v2) is now used directly by the loop.I've also theoretically come up with even more advanced techniques (such as taking N disjoint targets that can be dispatched all at once, and lazily generating the appropriate propagation of integer values
0..Nto use aswitch), but they either require other PRs to land as well first, and/or are too invasive and this has already been a ridiculous sunken cost compared to the measely benefits it offers.