Skip to main content

Module module

Module module 

Source
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::kinds names) and the node. In the games’ programs the kinds are dx.controlflow.hints, llvm.loop, tbaa, noalias, alias.scope, range and dx.precise.
AttributeGroup
A group of attributes, which an attribute list names by its id.
Function
A function body.
GlobalProperties
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_FUNCTION or MODULE_CODE_GLOBALVAR record.
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.
BinaryOp
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).
TailCall
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 AttributeGroup that holds a function’s own attributes (0xFFFFFFFF).

Functions§

attribute_name
The name of an LLVM 3.7 enum attribute’s bitcode kind number (nounwind for 18), for the kinds whose number dxc’s own listing confirms: 9 noalias, 11 nocapture, 12 noduplicate, 17 noreturn, 18 nounwind, 20 readnone, 21 readonly, 39 nonnull. They are the kinds the games’ programs and the test compilations use.

Type Aliases§

MetadataId
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 own Function::locals.