-
Couldn't load subscription status.
- Fork 64
Open
Description
When using the dr::Builder to construct a module during a pass over my AST, I often run into a mid-function variable declaration. The spec for SPIR-V says that those declarations need to go at the beginning of the first block:
2.4 ... All OpVariable instructions in a function must be in the first block in the function. These instructions ... must be the first instructions in that block.
Is there a helper function for writing those declarations in the correct location (even though my current block might not be the first block?). Is there an idiom for that, or an example I can see somewhere?
Metadata
Metadata
Assignees
Labels
No labels