24 cl::desc(
"The probability of a guard failing is assumed to be the " 25 "reciprocal of this value (default = 1 << 20)"));
33 auto *DeoptBlockTerm =
36 auto *CheckBI = cast<BranchInst>(CheckBB->getTerminator());
40 CheckBI->swapSuccessors();
43 CheckBI->getSuccessor(1)->setName(
"deopt");
53 auto *DeoptCall = B.
CreateCall(DeoptIntrinsic,
Args, {DeoptOB},
"");
58 DeoptCall->
setName(
"deoptcall");
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
This class represents lattice values for constants.
void makeGuardControlFlowExplicit(Function *DeoptIntrinsic, CallInst *Guard)
Splits control flow at point of Guard, replacing it with explicit branch by the condition of guard's ...
BasicBlock * getSuccessor(unsigned Idx) const
Return the specified successor. This instruction must be a terminator.
This class represents a function call, abstracting a target machine's calling convention.
LLVMContext & getContext() const
All values hold a context through their type.
User::op_iterator arg_end()
Return the iterator pointing to the end of the argument list.
Value * getArgOperand(unsigned i) const
ReturnInst * CreateRet(Value *V)
Create a 'ret <val>' instruction.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
void setName(const Twine &Name)
Change the name of the value.
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
Optional< OperandBundleUse > getOperandBundle(StringRef Name) const
Return an operand bundle by name, if present.
bool isVoidTy() const
Return true if this is 'void'.
initializer< Ty > init(const Ty &Val)
Type * getReturnType() const
Returns the type of the ret val.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Instruction * SplitBlockAndInsertIfThen(Value *Cond, Instruction *SplitBefore, bool Unreachable, MDNode *BranchWeights=nullptr, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr)
Split the containing block at the specified instruction - everything before SplitBefore stays in the ...
User::op_iterator arg_begin()
Return the iterator pointing to the beginning of the argument list.
ReturnInst * CreateRetVoid()
Create a 'ret void' instruction.
CallingConv::ID getCallingConv() const
CallInst * CreateCall(FunctionType *FTy, Value *Callee, ArrayRef< Value *> Args=None, const Twine &Name="", MDNode *FPMathTag=nullptr)
A container for an operand bundle being viewed as a set of values rather than a set of uses...
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
const BasicBlock * getParent() const