Table of Contents

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:

  1. 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.
  2. 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 StLoc
context ILTransformContext

Run(ILFunction, ILTransformContext)

public void Run(ILFunction function, ILTransformContext context)

Parameters

function ILFunction
context ILTransformContext