|
LLVM 23.0.0git
|
#include "llvm/CodeGen/InlineAsmPrepare.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 "inline-asm-prepare" |
Functions | |
| INITIALIZE_PASS_BEGIN (InlineAsmPrepare, "inline-asm-prepare", "Prepare inline asm insts", false, false) INITIALIZE_PASS_END(InlineAsmPrepare | |
| static void | printDebugDomInfo (const DominatorTree &DT, const Use &U, const BasicBlock *BB, bool IsDefaultDest) |
| static bool | isInSameBasicBlock (const Use &U, const BasicBlock *BB) |
| The Use is in the same BasicBlock as the intrinsic call. | |
| static void | updateSSA (DominatorTree &DT, CallBrInst *CBR, CallInst *Intrinsic, SSAUpdater &SSAUpdate) |
| static bool | splitCriticalEdges (CallBrInst *CBR, DominatorTree *DT) |
| static bool | insertIntrinsicCalls (CallBrInst *CBR, DominatorTree &DT) |
| Create a separate SSA definition in each indirect target (via llvm.callbr.landingpad). | |
| static bool | processCallBrInst (Function &F, CallBrInst *CBR, DominatorTree *DT) |
| static SmallVector< CallBrInst *, 2 > | findCallBrs (Function &F) |
| static bool | runImpl (Function &F, ArrayRef< CallBrInst * > CBRs, DominatorTree *DT) |
Variables | |
| inline asm | prepare |
| inline asm Prepare asm | insts |
| inline asm Prepare asm | false |
| #define DEBUG_TYPE "inline-asm-prepare" |
Definition at line 57 of file InlineAsmPrepare.cpp.
|
static |
Definition at line 210 of file InlineAsmPrepare.cpp.
References llvm::dyn_cast(), F, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::InlineAsmPreparePass::run().
| INITIALIZE_PASS_BEGIN | ( | InlineAsmPrepare | , |
| "inline-asm-prepare" | , | ||
| "Prepare inline asm insts" | , | ||
| false | , | ||
| false | ) |
References INITIALIZE_PASS_DEPENDENCY.
|
static |
Create a separate SSA definition in each indirect target (via llvm.callbr.landingpad).
This may require splitting critical edges so we have a location to place the intrinsic. Then remap users of the original callbr output SSA value to instead point to the appropriate llvm.callbr.landingpad value.
Definition at line 173 of file InlineAsmPrepare.cpp.
References llvm::SSAUpdater::AddAvailableValue(), Changed, llvm::Value::getContext(), llvm::CallBrInst::getDefaultDest(), llvm::CallBrInst::getIndirectDests(), llvm::Value::getName(), llvm::CallBrInst::getNumIndirectDests(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Value::getType(), llvm::SSAUpdater::Initialize(), llvm::SmallPtrSetImpl< PtrType >::insert(), and updateSSA().
Referenced by processCallBrInst().
|
static |
The Use is in the same BasicBlock as the intrinsic call.
Definition at line 100 of file InlineAsmPrepare.cpp.
References llvm::dyn_cast(), and I.
Referenced by updateSSA().
|
static |
Definition at line 88 of file InlineAsmPrepare.cpp.
References llvm::cast(), llvm::dbgs(), llvm::DominatorTree::dominates(), llvm::Value::getName(), llvm::isa(), and LLVM_DEBUG.
Referenced by updateSSA().
|
static |
Definition at line 201 of file InlineAsmPrepare.cpp.
References Changed, F, insertIntrinsicCalls(), and splitCriticalEdges().
Referenced by runImpl().
|
static |
Definition at line 219 of file InlineAsmPrepare.cpp.
References Changed, F, and processCallBrInst().
|
static |
Definition at line 141 of file InlineAsmPrepare.cpp.
References Changed, E(), llvm::CallBrInst::getNumSuccessors(), llvm::CallBrInst::getSuccessor(), I, llvm::isCriticalEdge(), Options, and llvm::SplitKnownCriticalEdge().
Referenced by processCallBrInst().
|
static |
Definition at line 105 of file InlineAsmPrepare.cpp.
References llvm::DominatorTree::dominates(), llvm::dyn_cast(), llvm::CallBrInst::getDefaultDest(), II, llvm::SmallPtrSetImpl< PtrType >::insert(), isInSameBasicBlock(), llvm::make_pointer_range(), printDebugDomInfo(), llvm::SSAUpdater::RewriteUse(), Uses, and llvm::Value::uses().
Referenced by insertIntrinsicCalls().
| inline asm Prepare asm false |
Definition at line 81 of file InlineAsmPrepare.cpp.
|
inline |
Definition at line 81 of file InlineAsmPrepare.cpp.
| inline asm prepare |
Definition at line 80 of file InlineAsmPrepare.cpp.