ILGPU  0.9.0
ILGPU.IR.Rewriting.SSARewriterContext< TVariable > Struct Template Reference

A processor that can be applied to every block. More...

Inheritance diagram for ILGPU.IR.Rewriting.SSARewriterContext< TVariable >:
ILGPU.IR.Rewriting.IRewriterContext

Public Member Functions

SSARewriterContext< TVariable > SpecializeBuilder (BasicBlock.Builder newBuilder)
 Specializes the build by setting a new block builder. More...
 
bool IsConverted (Value value)
 Returns true if the given value has been converted. More...
 
bool MarkConverted (Value value)
 Marks the given value as converted. More...
 
TValue Replace< TValue > (Value value, TValue newValue)
 Replaces the given value with the new value. More...
 
TValue ReplaceAndRemove< TValue > (Value value, TValue newValue)
 Replaces the given value with the new value and removes it from the block. More...
 
void Remove (Value value)
 Removes the given value from the block. More...
 
void SetValue (BasicBlock basicBlock, TVariable var, Value value)
 Sets the given variable to the given block. More...
 
Value GetValue (BasicBlock basicBlock, TVariable var)
 Returns the value of the given variable. More...
 

Public Attributes

BasicBlock.Builder Builder => baseContext.Builder
 Returns the associated builder. More...
 
BasicBlock Block => Builder.BasicBlock
 Returns the associated block. More...
 

Properties

SSABuilder< TVariable > SSABuilder [get]
 Returns the current SSA builder. More...
 
- Properties inherited from ILGPU.IR.Rewriting.IRewriterContext
BasicBlock.Builder Builder [get]
 Returns the associated builder. More...
 
BasicBlock Block [get]
 Returns the associated block. More...
 

Detailed Description

A processor that can be applied to every block.

Template Parameters
TVariableThe SSA variable type.
Type Constraints
TVariable :IEquatable<TVariable> 

Member Function Documentation

Value ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.GetValue ( BasicBlock  basicBlock,
TVariable  var 
)

Returns the value of the given variable.

Parameters
basicBlockThe target block.
varThe variable reference.
Returns
The value of the given variable.
bool ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.IsConverted ( Value  value)

Returns true if the given value has been converted.

Parameters
valueThe value to check.
Returns
True, if the given value has been converted.

Implements ILGPU.IR.Rewriting.IRewriterContext.

bool ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.MarkConverted ( Value  value)

Marks the given value as converted.

Parameters
valueThe value to mark.
Returns
True, if the element has been added to the set of value.

Implements ILGPU.IR.Rewriting.IRewriterContext.

void ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.Remove ( Value  value)

Removes the given value from the block.

Parameters
valueThe current value.

Implements ILGPU.IR.Rewriting.IRewriterContext.

TValue ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.Replace< TValue > ( Value  value,
TValue  newValue 
)

Replaces the given value with the new value.

Template Parameters
TValueThe value type of the new value.
Parameters
valueThe current value.
newValueThe new value.
Returns
Returns the new value.

Implements ILGPU.IR.Rewriting.IRewriterContext.

Type Constraints
TValue :Value 
TValue :baseContext.Replace 
TValue :value 
TValue :newValue 
TValue ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.ReplaceAndRemove< TValue > ( Value  value,
TValue  newValue 
)

Replaces the given value with the new value and removes it from the block.

Template Parameters
TValueThe value type of the new value.
Parameters
valueThe current value.
newValueThe new value.
Returns
Returns the new value.

Implements ILGPU.IR.Rewriting.IRewriterContext.

Type Constraints
TValue :Value 
TValue :baseContext.ReplaceAndRemove 
TValue :value 
TValue :newValue 
void ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.SetValue ( BasicBlock  basicBlock,
TVariable  var,
Value  value 
)

Sets the given variable to the given block.

Parameters
basicBlockThe target block.
varThe variable reference.
valueThe value to set.
SSARewriterContext<TVariable> ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.SpecializeBuilder ( BasicBlock.Builder  newBuilder)

Specializes the build by setting a new block builder.

Parameters
newBuilderThe new builder to use.
Returns
The specialized rewriter context.

Member Data Documentation

BasicBlock ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.Block => Builder.BasicBlock

Returns the associated block.

BasicBlock.Builder ILGPU.IR.Rewriting.SSARewriterContext< TVariable >.Builder => baseContext.Builder

Returns the associated builder.

Property Documentation

Returns the current SSA builder.


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