ΒΆbool ConstantFoldTerminator(
llvm::BasicBlock* BB,
bool DeleteDeadConditions = false,
const llvm::TargetLibraryInfo* TLI = nullptr,
llvm::DomTreeUpdater* DTU = nullptr)
bool ConstantFoldTerminator(
llvm::BasicBlock* BB,
bool DeleteDeadConditions = false,
const llvm::TargetLibraryInfo* TLI = nullptr,
llvm::DomTreeUpdater* DTU = nullptr)
Description
If a terminator instruction is predicated on a constant value, convert it into an unconditional branch to the constant destination. This is a nontrivial operation because the successors of this basic block must have their PHI nodes updated. Also calls RecursivelyDeleteTriviallyDeadInstructions() on any branch/switch conditions and indirectbr addresses this might make dead if DeleteDeadConditions is true.
Declared at: llvm/include/llvm/Transforms/Utils/Local.h:121
Parameters
- llvm::BasicBlock* BB
- bool DeleteDeadConditions = false
- const llvm::TargetLibraryInfo* TLI = nullptr
- llvm::DomTreeUpdater* DTU = nullptr