Class BlockLiveness
Contains value liveness data for a single block.
Inheritance
Inherited Members
Namespace: Flame.Compiler.Analysis
Assembly: Flame.Compiler.dll
Syntax
public sealed class BlockLiveness
Fields
| Improve this Doc View SourceImportIndex
The index of imported values in the virtual instruction list.
Declaration
public const int ImportIndex = -2
Field Value
Type | Description |
---|---|
System.Int32 |
ParameterIndex
The index of parameters in the virtual instruction list.
Declaration
public const int ParameterIndex = -1
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceExportIndex
The index of exported values in the virtual instruction list.
Declaration
public int ExportIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Imports
Gets this block's sequence of imported values.
Declaration
public IEnumerable<ValueTag> Imports { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValueTag> | A sequence of imported values. |
Methods
| Improve this Doc View SourceGetLiveValuesByIndex()
Gets a mapping of virtual instruction indices to the values that are live at those indices.
Declaration
public IReadOnlyDictionary<int, ImmutableHashSet<ValueTag>> GetLiveValuesByIndex()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.Int32, System.Collections.Immutable.ImmutableHashSet<ValueTag>> | A mapping of virtual instruction indices to live values. |
IsDefined(ValueTag)
Tells if a value is directly defined by this block.
Declaration
public bool IsDefined(ValueTag value)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | The value that may or may not be defined. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsDefinedOrImported(ValueTag)
Tells if a value is either defined or imported by this block.
Declaration
public bool IsDefinedOrImported(ValueTag value)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | The value that may or may not be defined or imported by this block. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsImported(ValueTag)
Tells if a value is imported by this block.
Declaration
public bool IsImported(ValueTag value)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | The value that may or may not be imported. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsLiveAt(ValueTag, Int32)
Tells if a value is live right after a particular instruction in this block.
Declaration
public bool IsLiveAt(ValueTag value, int index)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | The value whose liveness is to be queried. |
System.Int32 | index | An index into the instruction list that defines the point at which the value's liveness is queried. |
Returns
Type | Description |
---|---|
System.Boolean |
|