ΒΆvoid RemovePredecessorAndSimplify(
    llvm::BasicBlock* BB,
    llvm::BasicBlock* Pred,
    llvm::DomTreeUpdater* DTU = nullptr)

Description

Like BasicBlock::removePredecessor, this method is called when we're about to delete Pred as a predecessor of BB. If BB contains any PHI nodes, this drops the entries in the PHI nodes for Pred. Unlike the removePredecessor method, this attempts to simplify uses of PHI nodes that collapse into identity values. For example, if we have: x = phi(1, 0, 0, 0) y = and x, z .. and delete the predecessor corresponding to the '1', this will attempt to recursively fold the 'and' to 0.

Declared at: llvm/include/llvm/Transforms/Utils/Local.h:196

Parameters

llvm::BasicBlock* BB
llvm::BasicBlock* Pred
llvm::DomTreeUpdater* DTU = nullptr