Expand description
LLVM 3.7 IR as DXIL stores it, read from the bitstream tree: the type table, module values (globals, functions,
constants), metadata, value names and function bodies. Only what DXIL programs use is decoded; any other record in a
function body is refused by name. The blocks of a function body that say nothing a reader of the program’s behaviour needs (its metadata and its
use-list order) are the only things skipped. The metadata attached to an instruction or a function is kept as the
pairs the file stores (Instruction::attachments, Function::attachments, with the kind names in
Module::kinds), dx.precise also as Instruction::precise; the attribute groups and lists are kept as stored
(Module::attribute_groups, Module::attribute_lists) and each function value names its list.
Structs§
- Atomic
- The ordering of an atomic operation and the invocations it orders against.
- Attachment
- A metadata node attached to an instruction or a function: the kind (the id
Module::kindsnames) and the node. In the games’ programs the kinds aredx.controlflow.hints,llvm.loop,tbaa,noalias,alias.scope,rangeanddx.precise. - Attribute
Group - A group of attributes, which an attribute list names by its id.
- Function
- A function body.
- Global
Properties - What the module states of a function or a global variable beyond its type: how it links, and the other properties
of its
MODULE_CODE_FUNCTIONorMODULE_CODE_GLOBALVARrecord. - Instruction
- An instruction of a function body.
- Module
- A module: its types, values, metadata and function bodies.
Enums§
- Attribute
- An attribute of an attribute group, as the bitcode stores it.
- Binary
Op - A binary operator code (LLVM’s
BinaryOpcodes). - CastOp
- A cast opcode (LLVM’s
CastOpcodes). - Constant
- A module-level constant.
- Linkage
- How a global value links (LLVM’s
LinkageTypes, decoded from the bitcode’s linkage codes). - Metadata
- A metadata record.
- Op
- An instruction, with the value ids (absolute) and block numbers it names.
- Ordering
- The ordering of an atomic operation (LLVM’s
AtomicOrdering, by its bitcode code 0 to 6). - Tail
Call - Whether a call is marked a tail call.
- Type
- A type of the module’s type table.
- Value
- A value the module numbers.
Constants§
- FUNCTION_
SLOT - The slot of an
AttributeGroupthat holds a function’s own attributes (0xFFFFFFFF).
Functions§
- attribute_
name - The name of an LLVM 3.7 enum attribute’s bitcode kind number (
nounwindfor 18), for the kinds whose number dxc’s own listing confirms: 9noalias, 11nocapture, 12noduplicate, 17noreturn, 18nounwind, 20readnone, 21readonly, 39nonnull. They are the kinds the games’ programs and the test compilations use.
Type Aliases§
- Metadata
Id - An index into
Module::metadata. - TypeId
- An index into
Module::types. - ValueId
- An index into the values: the module’s
Module::values, then a function body’s ownFunction::locals.