KhronosGroup / KhronosGroup/SPIRV-Tools
Implement an operand iterator for Phi instructions.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
Phi instructions have many operands that are unrelated to the abstract idea of a Phi node.
The first two operands are the result and the type. The remaining operands come in pairs, one representing the actual operand (a result ID), the other representing the block label that the result ID is flowing through.
Ideally, we should be able to have accessors for these elements:
- ir::Instruction::PhiResult: Returns the resulting id.
- ir::Instruction::PhiType: Returns the type.
- ir::Instruction::PhiArg(i): Returns the result id for operand #i
- ir::Instruction::PhiBlock(i): Returns the block label for the operand #i.
Contributor guide
Assessment
This issue has not been assessed yet.