spv/lower + cfgssa speedups (useful when loading massive SPIR-V samples).#35
Draft
eddyb wants to merge 2 commits intoeddyb/var-iofrom
Draft
spv/lower + cfgssa speedups (useful when loading massive SPIR-V samples).#35eddyb wants to merge 2 commits intoeddyb/var-iofrom
eddyb wants to merge 2 commits intoeddyb/var-iofrom
Conversation
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.
Note: this PR is a draft to avoid accidental merging onto its "base" branch (used as a form of ad-hoc PR stacking), and will remain as such, until its "base" branch can be set to
main, i.e. all prerequisite PRs will have landed, up to and including this PR (whose branch is the "base" of this one):Varentity to give an identity to region inputs and node outputs. #34In order to avoid assuming SSA dominance rules,
spv::lower(SPIR-V -> SPIR-T) uses a helpercfgssamodule to compute the full set of "cross-block uses" (i.e. values used from blocks other than the ones they were defined in), and introduce additional dataflow as necessary - akin to always handling inter-BB dataflow via phis/"BB arguments".While this strategy has helped SPIR-T soundly implement "minimal loop" structurization (resulting in e.g. necessary
OpPhis at the end of SPIR-V -> SPIR-T -> SPIR-V, that didn't exist in the original unstructured SPIR-V), it doesn't come for free, and the conservatively correct dataflow can be excessive.This PR contains two small improvements (that mainly help with large single-function SPIR-V):
OpVariables)cfgssa's tracking bitsets (mainly to lower transient memory usage)