LLVM: lib/Transforms/Utils/ControlFlowUtils.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static Value * redirectToHub (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)

DEBUG_TYPE

#define DEBUG_TYPE "control-flow-hub"

BBPredicates

EdgeDescriptor

calcPredicateUsingBooleans()

Definition at line 131 of file ControlFlowUtils.cpp.

References assert(), llvm::PHINode::Create(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::ConstantInt::getFalse(), llvm::Type::getInt1Ty(), llvm::Value::getName(), llvm::ConstantInt::getTrue(), I, llvm::invertCondition(), LLVM_DEBUG, llvm::SmallVectorTemplateBase< T, bool >::push_back(), redirectToHub(), and llvm::ArrayRef< T >::size().

Referenced by convertToGuardPredicates().

calcPredicateUsingInteger()

Definition at line 86 of file ControlFlowUtils.cpp.

References llvm::ArrayRef< T >::begin(), llvm::PHINode::Create(), llvm::SelectInst::Create(), llvm::dbgs(), llvm::find(), llvm::ArrayRef< T >::front(), llvm::Type::getInt32Ty(), llvm::Value::getName(), I, LLVM_DEBUG, redirectToHub(), and llvm::ArrayRef< T >::size().

Referenced by convertToGuardPredicates().

convertToGuardPredicates()

reconnectPhis()

redirectToHub()

setupBranchForGuard()