Module rspirv::mr
[−]
[src]
Memory representation of various SPIR-V language constructs.
By language constructs, I mean general language concepts like module, function, basic block, instruction, and operands. This is different from the "control flow constructs" mentioned in the SPIR-V specification.
This memory representation is designed to be lightweight; there are no excessive sanity check or cross referrences within each language construct. It is intended to be used as a plain data vehicle of SPIR-V language constructs in the memory.
Required components of a language construct may still be wrapped around
using Option
; it makes the memory representation more flexible since
we don't always require valid language constructs.
Apart from definitions of various language constructs, this module also provides a loader for loading SPIR-V binaries (together with the parser) and a builder for building a SPIR-V memory representation interactively.
Structs
BasicBlock |
Memory representation of a SPIR-V basic block. |
Builder |
The memory representation builder. |
Function |
Memory representation of a SPIR-V function. |
InstIter |
Instruction iterator. |
Instruction |
Memory representation of a SPIR-V instruction. |
Loader |
The memory representation loader. |
Module |
Memory representation of a SPIR-V module. |
ModuleHeader |
Memory representation of a SPIR-V module header. |
Enums
Error |
Memory representation loading errors. |
Operand |
Memory representation of a SPIR-V operand. |
Functions
load_bytes |
Loads the SPIR-V |
load_words |
Loads the SPIR-V |