llvm::replaceDominatedUsesWith

Replace uses dominated by an instruction with another value.

Synopsis

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

unsigned int
replaceDominatedUsesWith(
    Value* From,
    Value* To,
    DominatorTree& DT,
    Instruction const* I);

Description

Replace each use of 'From' with 'To' if that use is dominated by the given instruction. 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 instruction dominance.
IInstruction that must dominate a use for it to be replaced.