|
LLVM 23.0.0git
|
#include "llvm/Transforms/Utils/ControlFlowUtils.h"#include "llvm/ADT/SetVector.h"#include "llvm/Analysis/DomTreeUpdater.h"#include "llvm/Analysis/LoopInfo.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 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) |
| #define DEBUG_TYPE "control-flow-hub" |
Definition at line 22 of file ControlFlowUtils.cpp.
| using BBPredicates = DenseMap<BasicBlock *, Instruction *> |
Definition at line 26 of file ControlFlowUtils.cpp.
Definition at line 27 of file ControlFlowUtils.cpp.
|
static |
Definition at line 130 of file ControlFlowUtils.cpp.
References assert(), llvm::cast(), llvm::PHINode::Create(), llvm::dbgs(), E(), 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().
|
static |
Definition at line 84 of file ControlFlowUtils.cpp.
References llvm::ArrayRef< T >::begin(), llvm::CmpInst::Create(), llvm::PHINode::Create(), llvm::SelectInst::Create(), llvm::dbgs(), E(), llvm::find(), llvm::ArrayRef< T >::front(), llvm::Type::getInt32Ty(), llvm::Value::getName(), I, llvm::CmpInst::ICMP_EQ, llvm::Int32Ty, LLVM_DEBUG, redirectToHub(), and llvm::ArrayRef< T >::size().
Referenced by convertToGuardPredicates().
|
static |
Definition at line 202 of file ControlFlowUtils.cpp.
References calcPredicateUsingBooleans(), calcPredicateUsingInteger(), llvm::BasicBlock::Create(), E(), F, llvm::ArrayRef< T >::front(), I, llvm::SmallVectorTemplateBase< T, bool >::push_back(), setupBranchForGuard(), and llvm::ArrayRef< T >::size().
Referenced by llvm::ControlFlowHub::finalize().
|
static |
Definition at line 237 of file ControlFlowUtils.cpp.
References assert(), llvm::BasicBlock::begin(), llvm::cast(), llvm::PHINode::Create(), llvm::BasicBlock::end(), llvm::PoisonValue::get(), I, llvm::isa(), and llvm::ArrayRef< T >::size().
Referenced by llvm::ControlFlowHub::finalize().
|
static |
Definition at line 35 of file ControlFlowUtils.cpp.
References assert(), llvm::cast(), llvm::UncondBrInst::Create(), llvm::dyn_cast(), and llvm::BasicBlock::getTerminator().
Referenced by calcPredicateUsingBooleans(), and calcPredicateUsingInteger().
|
static |
Definition at line 66 of file ControlFlowUtils.cpp.
References assert(), llvm::CondBrInst::Create(), E(), I, and llvm::ArrayRef< T >::size().
Referenced by convertToGuardPredicates().