Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a data-flow analysis for local variables in uniformity #3298

Merged
merged 3 commits into from
Aug 12, 2022

Conversation

alan-baker
Copy link
Contributor

Fixes #2859

  • Adds local variable value analysis to uniformity to track values
    • full assignments complete replace a value
    • partial assignments get connected to previous value
  • Describes function address space pointers as being desugared into
    variables and extra value return nodes

@alan-baker alan-baker added wgsl WebGPU Shading Language Issues uniformity Issues / discussions around uniformity analysis labels Aug 9, 2022
@alan-baker alan-baker added this to the V1.0 milestone Aug 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2022

Previews, as seen when this build job started (262b841):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!
Nearly there

wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
Fixes gpuweb#2859

* Adds local variable value analysis to uniformity to track values
  * full assignments complete replace a value
  * partial assignments get connected to previous value
* Describes function address space pointers as being desugared into
  variables and extra value return nodes
* Remove fallthrough references
* Clarify what is uniform for pointer parameters (the value pointed to)
* Fix edges for switch statement result
* Fix typos
Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks right.
Two editorial nits left.

wgsl/index.bs Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
wgsl/index.bs Outdated Show resolved Hide resolved
@dneto0
Copy link
Contributor

dneto0 commented Aug 12, 2022

Will land this, as this implements the thing already agreed to and implemented in Tint. (hence is implementable).

@dneto0 dneto0 merged commit e57b379 into gpuweb:main Aug 12, 2022
@alan-baker alan-baker deleted the local-var-uniformity branch August 12, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
uniformity Issues / discussions around uniformity analysis wgsl WebGPU Shading Language Issues
Projects
WGSL
Awaiting triage
Development

Successfully merging this pull request may close these issues.

Uniformity analysis of local variables
2 participants