LLVM 20.0.0git
Macros | Typedefs | Functions
ControlFlowUtils.cpp File Reference
#include "llvm/Transforms/Utils/ControlFlowUtils.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Transforms/Utils/Local.h"

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 22 of file ControlFlowUtils.cpp.

Typedef Documentation

◆ BBPredicates

Definition at line 26 of file ControlFlowUtils.cpp.

◆ EdgeDescriptor

Definition at line 27 of file ControlFlowUtils.cpp.

Function Documentation

◆ calcPredicateUsingBooleans()

static void calcPredicateUsingBooleans ( ArrayRef< EdgeDescriptor Branches,
ArrayRef< BasicBlock * >  Outgoing,
SmallVectorImpl< BasicBlock * > &  GuardBlocks,
BBPredicates GuardPredicates,
SmallVectorImpl< WeakVH > &  DeletionCandidates 
)
static

◆ calcPredicateUsingInteger()

static void calcPredicateUsingInteger ( ArrayRef< EdgeDescriptor Branches,
ArrayRef< BasicBlock * >  Outgoing,
ArrayRef< BasicBlock * >  GuardBlocks,
BBPredicates GuardPredicates 
)
static

◆ convertToGuardPredicates()

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

◆ reconnectPhis()

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

◆ redirectToHub()

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

◆ setupBranchForGuard()

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