Create a BranchFolder pass, with optional sub‐phases disabled.

Synopsis

Declared in <llvm/CodeGen/Passes.h>

FunctionPass*
createBranchFolder(
    bool EnableCommonHoist = true,
    bool EnableBasicBlockReordering = true);

Description

Optionally disables the common‐code hoisting and/or basic‐block reordering sub‐phases. Default enables both (full BranchFolding behavior).

Return Value

The newly created FunctionPass.

Parameters

Name

Description

EnableCommonHoist

Enable hoisting of common code out of successors.

EnableBasicBlockReordering

Enable reordering of basic blocks.

Created with MrDocs