Replace each use of 'From' with 'To' if that use is dominated by the end of the given BasicBlock and the callback ShouldReplace returns true. Returns the number of replacements made.
Declared in <llvm/Transforms/Utils/Local.h>
unsigned int
replaceDominatedUsesWithIf(
Value* From,
Value* To,
DominatorTree& DT,
BasicBlock const* BB,
function_ref<bool(Use const&, Value const*)> ShouldReplace);
| Name | Description |
|---|---|
| From | LLVM Value Representation |
| To | LLVM Value Representation |
| DT | Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree. |
| BB | LLVM Basic Block Representation |
| ShouldReplace | An efficient, type-erasing, non-owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns. |