Computes which values and terminators are uniform vs divergent in a function.

Synopsis

Declared in <llvm/ADT/GenericUniformityInfo.h>

template<typename ContextT>
class GenericUniformityInfo;

Description

Templated on an IR context that supplies block, value, and cycle types so the same algorithm works for LLVM IR and other IRs.

Type Aliases

Name

Description

BlockT

Basic‐block type from the IR context.

ConstValueRefT

Const value reference type from the IR context.

CycleInfoT

Cycle‐nesting analysis used while computing uniformity.

DominatorTreeT

Dominator‐tree type from the IR context.

FunctionT

Function type from the IR context.

InstructionT

Instruction type from the IR context.

TemporalDivergenceTuple

Tuple describing a temporally divergent value: value, use site, and cycle.

ThisT

Alias for this specialization of GenericUniformityInfo.

UseT

Use type from the IR context.

ValueRefT

Mutable value reference type from the IR context.

Member Functions

Name

Description

GenericUniformityInfo [constructor]

Constructors

operator=

Move‐assign, taking ownership of the analysis implementation.

compute

Run the uniformity analysis, filling divergence results.

forgetValue

Call before erasing V, or a later instruction reusing its address may be misclassified as uniform.

getCycleInfo

The cycle info this analysis was computed with.

getFunction

The GPU kernel this analysis result is for

getTemporalDivergenceList

Return the list of temporally divergent (value, use, cycle) tuples.

hasDivergentTerminator

Return true if block B's terminator is divergent.

isDivergentAtDef

Whether V is divergent at its definition.

isDivergentAtUse

Whether U is divergent at its use. Uses of a uniform value can be divergent.

isDivergentTerminator

Return true if terminator I has a divergent controlling condition.

isUniformAtDef

Whether V is uniform/non‐divergent at its definition.

isUniformAtUse

Whether U is uniform/non‐divergent at its use.

isUniformTerminator

Return true if terminator I has a uniform controlling condition.

print

T helper function for printing.

Specializations