ILGPU  0.9.0
ILGPU.IR.Construction.SSABuilder< TVariable > Class Template Reference

Constructs IR nodes that are in SSA form. More...

Classes

struct  Enumerator
 A successor or predecessor enumerator. More...
 
struct  MarkerProvider
 Provides marker values.
 
class  ValueContainer
 Represents a basic block during cps construction.
 

Public Member Functions

void SetValue (BasicBlock block, TVariable var, Value value)
 Sets the given variable to the given value. More...
 
Value GetValue (BasicBlock block, TVariable var)
 Returns the value of the given variable. More...
 
void RemoveValue (BasicBlock block, TVariable var)
 Removes the value of the given variable. More...
 
bool Process (BasicBlock block)
 Tries to process the associated block. More...
 
bool Seal (BasicBlock block)
 Tries to seals the associated node. More...
 
bool ProcessAndSeal (BasicBlock block)
 Tries to process the given node while always trying to seal the given node. More...
 
void TrySealSuccessors (BasicBlock block)
 Tries to seal all successors of the given block. More...
 
void SealRemainingBlocks ()
 Seals all remaining blocks in the appropriate order. More...
 
void AssertAllSealed ()
 Asserts that all blocks have been sealed. More...
 

Static Public Member Functions

static SSABuilder< TVariable > Create (Method.Builder methodBuilder)
 Creates a new SSA builder. More...
 
static SSABuilder< TVariable > Create (Method.Builder methodBuilder, in BlockCollection blockCollection)
 Creates a new SSA builder. More...
 

Properties

Method.Builder MethodBuilder [get]
 Returns the associated method builder. More...
 
BlockCollection Blocks [get]
 Returns the underlying list of blocks. More...
 

Detailed Description

Constructs IR nodes that are in SSA form.

Template Parameters
TVariableThe variable type.

Members of this class are not thread safe.

Type Constraints
TVariable :IEquatable<TVariable> 

Member Function Documentation

void ILGPU.IR.Construction.SSABuilder< TVariable >.AssertAllSealed ( )

Asserts that all blocks have been sealed.

This operation is only available in debug mode.

static SSABuilder<TVariable> ILGPU.IR.Construction.SSABuilder< TVariable >.Create ( Method.Builder  methodBuilder)
static

Creates a new SSA builder.

Parameters
methodBuilderThe current method builder.
Returns
The created SSA builder.
static SSABuilder<TVariable> ILGPU.IR.Construction.SSABuilder< TVariable >.Create ( Method.Builder  methodBuilder,
in BlockCollection  blockCollection 
)
static

Creates a new SSA builder.

Parameters
methodBuilderThe current method builder.
blockCollectionThe block collection.
Returns
The created SSA builder.
Value ILGPU.IR.Construction.SSABuilder< TVariable >.GetValue ( BasicBlock  block,
TVariable  var 
)

Returns the value of the given variable.

Parameters
blockThe target block.
varThe variable reference.
Returns
The value of the given variable.
bool ILGPU.IR.Construction.SSABuilder< TVariable >.Process ( BasicBlock  block)

Tries to process the associated block.

Parameters
blockThe target block.
bool ILGPU.IR.Construction.SSABuilder< TVariable >.ProcessAndSeal ( BasicBlock  block)

Tries to process the given node while always trying to seal the given node.

Parameters
blockThe basic block.
Returns
True, if the node has not been processed.
void ILGPU.IR.Construction.SSABuilder< TVariable >.RemoveValue ( BasicBlock  block,
TVariable  var 
)

Removes the value of the given variable.

Parameters
blockThe target block.
varThe variable reference.
bool ILGPU.IR.Construction.SSABuilder< TVariable >.Seal ( BasicBlock  block)

Tries to seals the associated node.

Parameters
blockThe target block.
void ILGPU.IR.Construction.SSABuilder< TVariable >.SealRemainingBlocks ( )

Seals all remaining blocks in the appropriate order.

void ILGPU.IR.Construction.SSABuilder< TVariable >.SetValue ( BasicBlock  block,
TVariable  var,
Value  value 
)

Sets the given variable to the given value.

Parameters
blockThe target block.
varThe variable reference.
valueThe value to set.
void ILGPU.IR.Construction.SSABuilder< TVariable >.TrySealSuccessors ( BasicBlock  block)

Tries to seal all successors of the given block.

Property Documentation

Returns the underlying list of blocks.

Method.Builder ILGPU.IR.Construction.SSABuilder< TVariable >.MethodBuilder
get

Returns the associated method builder.


The documentation for this class was generated from the following file: