Eliminate newly inserted PHI nodes in BB that duplicate earlier ones.

Synopsis

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

bool
EliminateNewDuplicatePHINodes(
    BasicBlock* BB,
    BasicBlock::phi_iterator FirstExistingPN);

Description

New PHI nodes are those before FirstExistingPN in the block's PHI list; existing ones start at that iterator. Identical new PHIs are first deduplicated among themselves, then against existing PHIs.

Return Value

True if any duplicate PHI was eliminated.

Parameters

Name

Description

BB

Block whose PHI nodes are considered.

FirstExistingPN

Iterator to the first PHI that already existed.

Created with MrDocs