KhronosGroup / KhronosGroup/SPIRV-Tools

SSARewriter needs to handle id overflows

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

Description

Doesn't seem like SSARewriter handles id overflows, which results in it creating invalid spirv, which then crashes further passes. The TODO in SSARewriter::CreatePhiCandidate mentions issue #1841, but that's been merged already, so I'm opening this as a separate issue for that specific pass.

Contributor guide

Open the contributing guide

Research direction

Start by locating SSARewriter::CreatePhiCandidate and read the TODO that references issue #1841. Trace how IDs are created and how overflow is handled in this pass. Done means overflow no longer produces invalid SPIR-V that crashes later passes, with the relevant pass behavior covered by tests if existing test locations are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.