Replace OldPred with NewPred in PHI nodes of a destination block.

Synopsis

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

void
updatePhiNodes(
    BasicBlock* DestBB,
    BasicBlock* OldPred,
    BasicBlock* NewPred,
    PHINode* Until = nullptr);

Parameters

Name

Description

DestBB

Block whose PHI nodes are updated.

OldPred

Predecessor edge being replaced.

NewPred

Predecessor edge that replaces OldPred.

Until

Optional PHI at which to stop updating; later PHIs are skipped.

Created with MrDocs