llvm::ReplaceInstWithInst

ReplaceInstWithInst overloads

Synopses

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

Replace one instruction with another and copy its debug location.

void
ReplaceInstWithInst(
    Instruction* From,
    Instruction* To);
» more...

Replace one instruction with another in a basic block.

void
ReplaceInstWithInst(
    BasicBlock* BB,
    BasicBlock::iterator& BI,
    Instruction* I);
» more...

Parameters

NameDescription
FromInstruction to replace and delete.
ToReplacement instruction.
BBBasic block containing the instruction to replace.
BIIterator referring to the instruction to replace.
IReplacement instruction to insert in its place.