llvm::patchReplacementInstruction

Relax a replacement so it is no more restrictive than the original.

Synopsis

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

void
patchReplacementInstruction(
    Instruction* I,
    Value* Repl);

Description

Patch the replacement so that it is not more restrictive than the value being replaced. It assumes that the replacement does not get moved from its original position.

Parameters

NameDescription
IOriginal instruction being replaced.
ReplReplacement value that may need patching.