Class CopyPropagation
- Namespace
- ICSharpCode.Decompiler.IL.Transforms
- Assembly
- ICSharpCode.Decompiler.dll
Runs a very simple form of copy propagation. Copy propagation is used in two cases:
- assignments from arguments to local variables If the target variable is assigned to only once (so always is that argument) and the argument is never changed (no ldarga/starg), then we can replace the variable with the argument.
- assignments of address-loading instructions to local variables
public class CopyPropagation : IILTransform
- Inheritance
-
CopyPropagation
- Implements
- Inherited Members
Constructors
CopyPropagation()
public CopyPropagation()
Methods
Propagate(StLoc, ILTransformContext)
public static void Propagate(StLoc store, ILTransformContext context)
Parameters
store
StLoccontext
ILTransformContext
Run(ILFunction, ILTransformContext)
public void Run(ILFunction function, ILTransformContext context)
Parameters
function
ILFunctioncontext
ILTransformContext