Class JumpThreading
An optimization that tries to eliminate repeated jumps between blocks.
Inherited Members
Namespace: Flame.Compiler.Transforms
Assembly: Flame.Compiler.dll
Syntax
public sealed class JumpThreading : IntraproceduralOptimization
Constructors
| Edit this page View SourceJumpThreading(bool)
Creates an instance of the jump threading transform.
Declaration
public JumpThreading(bool includeSwitches = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeSwitches | Tells if switches are also eligible for jump threading.
If set to |
Properties
| Edit this page View SourceIncludeSwitches
Tells if switches are also eligible for jump threading.
If set to true, then switches that branch to
other switches can be merged and jumps to switches can
be replaced with the switch itself.
Declaration
public bool IncludeSwitches { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Methods
| Edit this page View SourceApply(FlowGraph)
Applies the jump threading optimization to a flow graph.
Declaration
public override FlowGraph Apply(FlowGraph graph)
Parameters
| Type | Name | Description |
|---|---|---|
| FlowGraph | graph | The flow graph to rewrite. |
Returns
| Type | Description |
|---|---|
| FlowGraph | An optimized flow graph. |