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
Namespace: Flame.Compiler.Transforms
Assembly: Flame.Compiler.dll
Syntax
public class InstructionReordering : IntraproceduralOptimization
Constructors
| Edit this page View SourceInstructionReordering()
Creates an instruction reordering pass.
Declaration
protected InstructionReordering()
Fields
| Edit this page 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
| Edit this page 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
| Edit this page 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 |
|---|---|
| IReadOnlyList<ValueTag> | An ordered list of arguments. |