KhronosGroup / KhronosGroup/SPIRV-Tools

Work on more general solution to adding access chain placeholders during reduction

Open
#2,183 0 comments 0 reactions 0 assignees View on GitHub
component:reducer
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

In spirv-reduce's loop-to-conditional reduction pass, if we find that an access chain use is no longer dominated, we replace the use with an access to a (possibly new) variable of the right type. This is fine if the storage class is Private or Function; we can just add a new variable. But for other storage classes I'm unsure whether it's legal to arbitrarily add more global-scoped variables with the given storage class; there might be limits on the number of such variables that are allowed, and quite possibly constraints on adding such variables without modifying the associated host code.

Contributor guide

Open the contributing guide

Research direction

Start in spirv-reduce's loop-to-conditional reduction pass and trace how access chain uses are replaced when they are no longer dominated. Investigate the legality and constraints of adding variables for storage classes other than Private or Function, including possible limits and associated host-code requirements; done means the reduction has a general valid replacement strategy for those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.