Class SwitchSimplification
An optimization that transforms switch flows in a way that makes it easier for other optimizations to reason about said switches.
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 SwitchSimplification : IntraproceduralOptimization
Fields
| Improve this Doc View SourceInstance
An instance of the switch simplification optimization.
Declaration
public static readonly SwitchSimplification Instance
Field Value
Type | Description |
---|---|
SwitchSimplification |
Methods
| Improve this Doc View SourceApply(FlowGraph)
Simplifies switches in a particular flow graph.
Declaration
public override FlowGraph Apply(FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph | The graph to transform. |
Returns
Type | Description |
---|---|
FlowGraph | A transformed graph. |
Overrides
| Improve this Doc View SourceTrySimplifySwitchFlow(BasicBlockBuilder)
Tries to simplify a basic block's switch flow, provided that the block ends in switch flow.
Declaration
public static bool TrySimplifySwitchFlow(BasicBlockBuilder block)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockBuilder | block | The basic block to simplify. |
Returns
Type | Description |
---|---|
System.Boolean |
|