LLVM 20.0.0git
|
#include "llvm/CodeGen/CallBrPrepare.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "callbr-prepare" |
Functions | |
static bool | SplitCriticalEdges (ArrayRef< CallBrInst * > CBRs, DominatorTree &DT) |
static bool | InsertIntrinsicCalls (ArrayRef< CallBrInst * > CBRs, DominatorTree &DT) |
static void | UpdateSSA (DominatorTree &DT, CallBrInst *CBR, CallInst *Intrinsic, SSAUpdater &SSAUpdate) |
static SmallVector< CallBrInst *, 2 > | FindCallBrs (Function &Fn) |
INITIALIZE_PASS_BEGIN (CallBrPrepare, "callbrprepare", "Prepare callbr", false, false) INITIALIZE_PASS_END(CallBrPrepare | |
static bool | IsInSameBasicBlock (const Use &U, const BasicBlock *BB) |
static void | PrintDebugDomInfo (const DominatorTree &DT, const Use &U, const BasicBlock *BB, bool IsDefaultDest) |
Variables | |
callbrprepare | |
Prepare | callbr |
Prepare | false |
#define DEBUG_TYPE "callbr-prepare" |
Definition at line 55 of file CallBrPrepare.cpp.
|
static |
Definition at line 109 of file CallBrPrepare.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::CallBrPreparePass::run().
INITIALIZE_PASS_BEGIN | ( | CallBrPrepare | , |
"callbrprepare" | , | ||
"Prepare callbr" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 140 of file CallBrPrepare.cpp.
References llvm::SSAUpdater::AddAvailableValue(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::SSAUpdater::Initialize(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::IRBuilderBase::SetInsertPoint(), and UpdateSSA().
Referenced by llvm::CallBrPreparePass::run().
|
static |
|
static |
Definition at line 173 of file CallBrPrepare.cpp.
References llvm::dbgs(), llvm::DominatorTree::dominates(), llvm::Value::getName(), and LLVM_DEBUG.
Referenced by UpdateSSA().
|
static |
Definition at line 118 of file CallBrPrepare.cpp.
References llvm::isCriticalEdge(), Options, and llvm::SplitKnownCriticalEdge().
Referenced by llvm::CallBrPreparePass::run().
|
static |
Definition at line 185 of file CallBrPrepare.cpp.
References llvm::DominatorTree::dominates(), llvm::CallBrInst::getDefaultDest(), II, llvm::SmallPtrSetImpl< PtrType >::insert(), IsInSameBasicBlock(), llvm::make_pointer_range(), PrintDebugDomInfo(), llvm::SSAUpdater::RewriteUse(), llvm::Value::uses(), and Uses.
Referenced by InsertIntrinsicCalls().
Prepare callbr |
Definition at line 100 of file CallBrPrepare.cpp.
callbrprepare |
Definition at line 100 of file CallBrPrepare.cpp.
Prepare false |
Definition at line 100 of file CallBrPrepare.cpp.