Class FusedInstructionPrototype
A prototype for a fused instruction: a special composite instruction that is entirely equivalent to a sequence of core instructions. Fused instructions are mostly useful for making back-ends emit better code.
Inheritance
Inherited Members
Namespace: Flame.Compiler.Instructions.Fused
Assembly: Flame.Compiler.dll
Syntax
public abstract class FusedInstructionPrototype : InstructionPrototype
Constructors
| Improve this Doc View SourceFusedInstructionPrototype()
Creates a fused instruction prototype.
Declaration
public FusedInstructionPrototype()
Properties
| Improve this Doc View SourceResultType
Gets the type of value produced instantiations of this prototype.
Declaration
public override sealed IType ResultType { get; }
Property Value
Type | Description |
---|---|
IType | A type of value. |
Overrides
Methods
| Improve this Doc View SourceCheckConformance(Instruction, MethodBody)
Checks if a particular instance of this prototype conforms to the rules for this instruction prototype.
Declaration
public override IReadOnlyList<string> CheckConformance(Instruction instance, MethodBody body)
Parameters
Type | Name | Description |
---|---|---|
Instruction | instance | An instance of this prototype. |
MethodBody | body | The method body that defines the instruction. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> | A list of conformance errors in the instruction. |
Overrides
| Improve this Doc View SourceExpand(NamedInstructionBuilder)
Expands this fused instruction to an equivalent nonempty sequence of core instructions. The instance itself must be replaced by another instruction. Instruction expansion must be formulaic: it cannot depend on the rest of the control-flow graph.
Declaration
public abstract void Expand(NamedInstructionBuilder instance)
Parameters
Type | Name | Description |
---|---|---|
NamedInstructionBuilder | instance | An instance of this prototype to expand. |