llvm::replaceDominatedUsesWith

Replace uses dominated by an edge with another value.

Synopsis

Declared in <llvm/Transforms/Utils/Local.h>

unsigned int
replaceDominatedUsesWith(
    Value* From,
    Value* To,
    DominatorTree& DT,
    BasicBlockEdge const& Edge);

Description

Replace each use of 'From' with 'To' if that use is dominated by the given edge. Returns the number of replacements made.

Return Value

Number of replacements made.

Parameters

NameDescription
FromValue whose dominated uses are replaced.
ToReplacement value for those uses.
DTDominator tree used to test edge dominance.
EdgeEdge that must dominate a use for it to be replaced.