ILGPU  0.9.0
ILGPU.IR.Rewriting.RewriterContext Struct Reference

Helper class to process value instances. More...

Inheritance diagram for ILGPU.IR.Rewriting.RewriterContext:
ILGPU.IR.Rewriting.IRewriterContext

Public Member Functions

RewriterContext 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...
 

Public Attributes

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

Properties

BasicBlock.Builder Builder [get]
 Returns the associated 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

Helper class to process value instances.

Member Function Documentation

bool ILGPU.IR.Rewriting.RewriterContext.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.RewriterContext.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.RewriterContext.Remove ( Value  value)

Removes the given value from the block.

Parameters
valueThe current value.

Implements ILGPU.IR.Rewriting.IRewriterContext.

TValue ILGPU.IR.Rewriting.RewriterContext.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 ILGPU.IR.Rewriting.RewriterContext.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 
RewriterContext ILGPU.IR.Rewriting.RewriterContext.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.RewriterContext.Block => Builder.BasicBlock

Returns the associated block.

Property Documentation

BasicBlock.Builder ILGPU.IR.Rewriting.RewriterContext.Builder
get

Returns the associated builder.


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