Flatten a CFG by collapsing related if‐conditions and regions.

Synopsis

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

bool
FlattenCFG(
    BasicBlock* BB,
    AAResults* AA = nullptr);

Description

This function is used to flatten a CFG. For example, it uses parallel‐and and parallel‐or mode to collapse if‐conditions and merge if‐regions with identical statements.

Return Value

True if the CFG was flattened.

Parameters

Name

Description

BB

Basic block whose surrounding CFG may be flattened.

AA

Optional alias analysis used during flattening.

Created with MrDocs