Class JumpThreading
An optimization that tries to eliminate repeated jumps between blocks.
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 sealed class JumpThreading : IntraproceduralOptimization
Constructors
| Improve this Doc View SourceJumpThreading(Boolean)
Creates an instance of the jump threading transform.
Declaration
public JumpThreading(bool includeSwitches = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeSwitches | Tells if switches are also eligible for jump threading.
If set to |
Properties
| Improve this Doc 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 |
---|---|
System.Boolean |
|
Methods
| Improve this Doc 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. |