llvm::SimplifyInstructionsInBlock

Simplify instructions in a block and recursively delete dead ones.

Synopsis

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

bool
SimplifyInstructionsInBlock(
    BasicBlock* BB,
    TargetLibraryInfo const* TLI = nullptr);

Description

Scan the specified basic block and try to simplify any instructions in it and recursively delete dead instructions.

This returns true if it changed the code, note that it can delete instructions in other blocks as well in this block.

Return Value

True if any instructions were changed or deleted.

Parameters

NameDescription
BBBasic block whose instructions may be simplified.
TLIOptional target library info used for simplification.