Class InstructionReordering
A transformation that reorders instructions. It is intended to be used prior to codegen. Instruction reordering helps reduce register pressure and promotes register-to-stack conversion on virtual machines that use an evaluation stack.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.Compiler.Transforms
Assembly: Flame.Compiler.dll
Syntax
public class InstructionReordering : IntraproceduralOptimization
Constructors
| Improve this Doc View SourceInstructionReordering()
Creates an instruction reordering pass.
Declaration
protected InstructionReordering()
Fields
| Improve this Doc View SourceInstance
An instance of the instruction reordering transform.
Declaration
public static readonly InstructionReordering Instance
Field Value
Type | Description |
---|---|
InstructionReordering | An instruction reordering transform. |
Methods
| Improve this Doc View SourceApply(FlowGraph)
Applies this intraprocedural optimization to a flow graph.
Declaration
public override FlowGraph Apply(FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph | The flow graph to transform. |
Returns
Type | Description |
---|---|
FlowGraph | A transformed flow graph. |
Overrides
| Improve this Doc View SourceGetOrderedArguments(Instruction)
Gets an instruction's arguments and orders them by use.
Declaration
protected virtual IReadOnlyList<ValueTag> GetOrderedArguments(Instruction instruction)
Parameters
Type | Name | Description |
---|---|---|
Instruction | instruction | The instruction to inspect. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<ValueTag> | An ordered list of arguments. |