LLVM 22.0.0git
ControlFlowUtils.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "control-flow-hub"

Typedefs

using BBPredicates = DenseMap<BasicBlock *, Instruction *>
using EdgeDescriptor = ControlFlowHub::BranchDescriptor

Functions

static ValueredirectToHub (BasicBlock *BB, BasicBlock *Succ0, BasicBlock *Succ1, BasicBlock *FirstGuardBlock)
static void setupBranchForGuard (ArrayRef< BasicBlock * > GuardBlocks, ArrayRef< BasicBlock * > Outgoing, BBPredicates &GuardPredicates)
static void calcPredicateUsingInteger (ArrayRef< EdgeDescriptor > Branches, ArrayRef< BasicBlock * > Outgoing, ArrayRef< BasicBlock * > GuardBlocks, BBPredicates &GuardPredicates)
static void calcPredicateUsingBooleans (ArrayRef< EdgeDescriptor > Branches, ArrayRef< BasicBlock * > Outgoing, SmallVectorImpl< BasicBlock * > &GuardBlocks, BBPredicates &GuardPredicates, SmallVectorImpl< WeakVH > &DeletionCandidates)
static void convertToGuardPredicates (ArrayRef< EdgeDescriptor > Branches, ArrayRef< BasicBlock * > Outgoing, SmallVectorImpl< BasicBlock * > &GuardBlocks, SmallVectorImpl< WeakVH > &DeletionCandidates, const StringRef Prefix, std::optional< unsigned > MaxControlFlowBooleans)
static void reconnectPhis (BasicBlock *Out, BasicBlock *GuardBlock, ArrayRef< EdgeDescriptor > Incoming, BasicBlock *FirstGuardBlock)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "control-flow-hub"

Definition at line 21 of file ControlFlowUtils.cpp.

Typedef Documentation

◆ BBPredicates

Definition at line 25 of file ControlFlowUtils.cpp.

◆ EdgeDescriptor

Function Documentation

◆ calcPredicateUsingBooleans()

◆ calcPredicateUsingInteger()

◆ convertToGuardPredicates()

void convertToGuardPredicates ( ArrayRef< EdgeDescriptor > Branches,
ArrayRef< BasicBlock * > Outgoing,
SmallVectorImpl< BasicBlock * > & GuardBlocks,
SmallVectorImpl< WeakVH > & DeletionCandidates,
const StringRef Prefix,
std::optional< unsigned > MaxControlFlowBooleans )
static

◆ reconnectPhis()

void reconnectPhis ( BasicBlock * Out,
BasicBlock * GuardBlock,
ArrayRef< EdgeDescriptor > Incoming,
BasicBlock * FirstGuardBlock )
static

◆ redirectToHub()

Value * redirectToHub ( BasicBlock * BB,
BasicBlock * Succ0,
BasicBlock * Succ1,
BasicBlock * FirstGuardBlock )
static

◆ setupBranchForGuard()

void setupBranchForGuard ( ArrayRef< BasicBlock * > GuardBlocks,
ArrayRef< BasicBlock * > Outgoing,
BBPredicates & GuardPredicates )
static