ΒΆbool simplifyCFG(
    llvm::BasicBlock* BB,
    const llvm::TargetTransformInfo& TTI,
    const llvm::SimplifyCFGOptions& Options = {},
    SmallPtrSetImpl<llvm::BasicBlock*>*
        LoopHeaders = nullptr)

Description

This function is used to do simplification of a CFG. For example, it adjusts branches to branches to eliminate the extra hop, it eliminates unreachable basic blocks, and does other peephole optimization of the CFG. It returns true if a modification was made, possibly deleting the basic block that was pointed to. LoopHeaders is an optional input parameter providing the set of loop headers that SimplifyCFG should not eliminate.

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

Parameters

llvm::BasicBlock* BB
const llvm::TargetTransformInfo& TTI
const llvm::SimplifyCFGOptions& Options = {}
SmallPtrSetImpl<llvm::BasicBlock*>* LoopHeaders = nullptr