26 :
User(ty,
Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
31 assert(BB &&
"Instruction to insert before is not in a basic block!");
38 :
User(ty,
Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
41 assert(InsertAtEnd &&
"Basic block to append to may not be NULL!");
46 assert(!Parent &&
"Instruction still linked in the program!");
47 if (hasMetadataHashEntry())
48 clearMetadataHashEntries();
97 assert(I == BB.
end() || I->getParent() == &BB);
110 cast<PossiblyExactOperator>(
this)->
setIsExact(b);
124 case Instruction::Sub:
125 case Instruction::Mul:
126 case Instruction::Shl:
131 case Instruction::UDiv:
132 case Instruction::SDiv:
133 case Instruction::AShr:
134 case Instruction::LShr:
135 cast<PossiblyExactOperator>(
this)->
setIsExact(
false);
138 case Instruction::GetElementPtr:
139 cast<GetElementPtrInst>(
this)->setIsInBounds(
false);
145 return cast<PossiblyExactOperator>(
this)->
isExact();
149 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
150 cast<FPMathOperator>(
this)->
setFast(B);
154 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
159 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
164 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
169 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
174 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
179 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
184 assert(isa<FPMathOperator>(
this) &&
"setting fast-math flag on invalid op");
189 assert(isa<FPMathOperator>(
this) &&
"copying fast-math flag on invalid op");
194 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
195 return cast<FPMathOperator>(
this)->
isFast();
199 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
204 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
205 return cast<FPMathOperator>(
this)->
hasNoNaNs();
209 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
210 return cast<FPMathOperator>(
this)->
hasNoInfs();
214 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
219 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
224 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
229 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
234 assert(isa<FPMathOperator>(
this) &&
"getting fast-math flag on invalid op");
244 if (IncludeWrapFlags && isa<OverflowingBinaryOperator>(
this)) {
245 if (
auto *
OB = dyn_cast<OverflowingBinaryOperator>(V)) {
252 if (
auto *PE = dyn_cast<PossiblyExactOperator>(V))
253 if (isa<PossiblyExactOperator>(
this))
257 if (
auto *
FP = dyn_cast<FPMathOperator>(V))
258 if (isa<FPMathOperator>(
this))
261 if (
auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
262 if (
auto *DestGEP = dyn_cast<GetElementPtrInst>(
this))
263 DestGEP->setIsInBounds(SrcGEP->isInBounds() | DestGEP->isInBounds());
267 if (
auto *
OB = dyn_cast<OverflowingBinaryOperator>(V)) {
268 if (isa<OverflowingBinaryOperator>(
this)) {
274 if (
auto *PE = dyn_cast<PossiblyExactOperator>(V))
275 if (isa<PossiblyExactOperator>(
this))
278 if (
auto *
FP = dyn_cast<FPMathOperator>(V)) {
279 if (isa<FPMathOperator>(
this)) {
281 FM &=
FP->getFastMathFlags();
286 if (
auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
287 if (
auto *DestGEP = dyn_cast<GetElementPtrInst>(
this))
288 DestGEP->setIsInBounds(SrcGEP->isInBounds() & DestGEP->isInBounds());
294 case Ret:
return "ret";
295 case Br:
return "br";
296 case Switch:
return "switch";
297 case IndirectBr:
return "indirectbr";
298 case Invoke:
return "invoke";
299 case Resume:
return "resume";
300 case Unreachable:
return "unreachable";
301 case CleanupRet:
return "cleanupret";
302 case CatchRet:
return "catchret";
303 case CatchPad:
return "catchpad";
304 case CatchSwitch:
return "catchswitch";
307 case FNeg:
return "fneg";
310 case Add:
return "add";
311 case FAdd:
return "fadd";
312 case Sub:
return "sub";
313 case FSub:
return "fsub";
314 case Mul:
return "mul";
315 case FMul:
return "fmul";
316 case UDiv:
return "udiv";
317 case SDiv:
return "sdiv";
318 case FDiv:
return "fdiv";
319 case URem:
return "urem";
320 case SRem:
return "srem";
321 case FRem:
return "frem";
324 case And:
return "and";
325 case Or :
return "or";
326 case Xor:
return "xor";
329 case Alloca:
return "alloca";
330 case Load:
return "load";
331 case Store:
return "store";
332 case AtomicCmpXchg:
return "cmpxchg";
333 case AtomicRMW:
return "atomicrmw";
334 case Fence:
return "fence";
335 case GetElementPtr:
return "getelementptr";
338 case Trunc:
return "trunc";
339 case ZExt:
return "zext";
340 case SExt:
return "sext";
341 case FPTrunc:
return "fptrunc";
342 case FPExt:
return "fpext";
343 case FPToUI:
return "fptoui";
344 case FPToSI:
return "fptosi";
345 case UIToFP:
return "uitofp";
346 case SIToFP:
return "sitofp";
347 case IntToPtr:
return "inttoptr";
348 case PtrToInt:
return "ptrtoint";
349 case BitCast:
return "bitcast";
350 case AddrSpaceCast:
return "addrspacecast";
353 case ICmp:
return "icmp";
354 case FCmp:
return "fcmp";
355 case PHI:
return "phi";
356 case Select:
return "select";
357 case Call:
return "call";
358 case Shl:
return "shl";
359 case LShr:
return "lshr";
360 case AShr:
return "ashr";
361 case VAArg:
return "va_arg";
362 case ExtractElement:
return "extractelement";
363 case InsertElement:
return "insertelement";
364 case ShuffleVector:
return "shufflevector";
365 case ExtractValue:
return "extractvalue";
366 case InsertValue:
return "insertvalue";
367 case LandingPad:
return "landingpad";
368 case CleanupPad:
return "cleanuppad";
370 default:
return "<Invalid operator> ";
378 bool IgnoreAlignment =
false) {
380 "Can not compare special state of different instructions");
382 if (
const AllocaInst *AI = dyn_cast<AllocaInst>(I1))
383 return AI->getAllocatedType() == cast<AllocaInst>(I2)->getAllocatedType() &&
384 (AI->getAlignment() == cast<AllocaInst>(I2)->
getAlignment() ||
386 if (
const LoadInst *LI = dyn_cast<LoadInst>(I1))
387 return LI->isVolatile() == cast<LoadInst>(I2)->
isVolatile() &&
388 (LI->getAlignment() == cast<LoadInst>(I2)->
getAlignment() ||
390 LI->getOrdering() == cast<LoadInst>(I2)->getOrdering() &&
391 LI->getSyncScopeID() == cast<LoadInst>(I2)->getSyncScopeID();
393 return SI->isVolatile() == cast<StoreInst>(I2)->
isVolatile() &&
396 SI->getOrdering() == cast<StoreInst>(I2)->getOrdering() &&
397 SI->getSyncScopeID() == cast<StoreInst>(I2)->getSyncScopeID();
398 if (
const CmpInst *CI = dyn_cast<CmpInst>(I1))
399 return CI->getPredicate() == cast<CmpInst>(I2)->
getPredicate();
400 if (
const CallInst *CI = dyn_cast<CallInst>(I1))
401 return CI->isTailCall() == cast<CallInst>(I2)->isTailCall() &&
402 CI->getCallingConv() == cast<CallInst>(I2)->getCallingConv() &&
403 CI->getAttributes() == cast<CallInst>(I2)->
getAttributes() &&
404 CI->hasIdenticalOperandBundleSchema(*cast<CallInst>(I2));
405 if (
const InvokeInst *CI = dyn_cast<InvokeInst>(I1))
406 return CI->getCallingConv() == cast<InvokeInst>(I2)->getCallingConv() &&
408 CI->hasIdenticalOperandBundleSchema(*cast<InvokeInst>(I2));
410 return IVI->getIndices() == cast<InsertValueInst>(I2)->getIndices();
412 return EVI->getIndices() == cast<ExtractValueInst>(I2)->getIndices();
413 if (
const FenceInst *FI = dyn_cast<FenceInst>(I1))
414 return FI->getOrdering() == cast<FenceInst>(I2)->getOrdering() &&
415 FI->getSyncScopeID() == cast<FenceInst>(I2)->getSyncScopeID();
417 return CXI->isVolatile() == cast<AtomicCmpXchgInst>(I2)->
isVolatile() &&
418 CXI->isWeak() == cast<AtomicCmpXchgInst>(I2)->
isWeak() &&
419 CXI->getSuccessOrdering() ==
420 cast<AtomicCmpXchgInst>(I2)->getSuccessOrdering() &&
421 CXI->getFailureOrdering() ==
422 cast<AtomicCmpXchgInst>(I2)->getFailureOrdering() &&
423 CXI->getSyncScopeID() ==
424 cast<AtomicCmpXchgInst>(I2)->getSyncScopeID();
426 return RMWI->getOperation() == cast<AtomicRMWInst>(I2)->getOperation() &&
427 RMWI->isVolatile() == cast<AtomicRMWInst>(I2)->
isVolatile() &&
428 RMWI->getOrdering() == cast<AtomicRMWInst>(I2)->getOrdering() &&
429 RMWI->getSyncScopeID() == cast<AtomicRMWInst>(I2)->getSyncScopeID();
454 if (
const PHINode *thisPHI = dyn_cast<PHINode>(
this)) {
455 const PHINode *otherPHI = cast<PHINode>(
I);
456 return std::equal(thisPHI->block_begin(), thisPHI->block_end(),
466 unsigned flags)
const {
501 if (PN->getIncomingBlock(U) != BB)
509 default:
return false;
510 case Instruction::VAArg:
512 case Instruction::Fence:
513 case Instruction::AtomicCmpXchg:
514 case Instruction::AtomicRMW:
515 case Instruction::CatchPad:
516 case Instruction::CatchRet:
519 return !cast<CallInst>(
this)->doesNotAccessMemory();
520 case Instruction::Invoke:
521 return !cast<InvokeInst>(
this)->doesNotAccessMemory();
523 return !cast<StoreInst>(
this)->isUnordered();
529 default:
return false;
530 case Instruction::Fence:
532 case Instruction::VAArg:
533 case Instruction::AtomicCmpXchg:
534 case Instruction::AtomicRMW:
535 case Instruction::CatchPad:
536 case Instruction::CatchRet:
539 return !cast<CallInst>(
this)->onlyReadsMemory();
540 case Instruction::Invoke:
541 return !cast<InvokeInst>(
this)->onlyReadsMemory();
543 return !cast<LoadInst>(
this)->isUnordered();
551 case Instruction::AtomicCmpXchg:
552 case Instruction::AtomicRMW:
553 case Instruction::Fence:
567 case Instruction::AtomicCmpXchg:
568 case Instruction::AtomicRMW:
579 case Instruction::AtomicCmpXchg:
580 case Instruction::AtomicRMW:
587 if (
const CallInst *CI = dyn_cast<CallInst>(
this))
588 return !CI->doesNotThrow();
589 if (
const auto *CRI = dyn_cast<CleanupReturnInst>(
this))
590 return CRI->unwindsToCaller();
591 if (
const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(
this))
592 return CatchSwitch->unwindsToCaller();
593 return isa<ResumeInst>(
this);
611 if (!isa<DbgInfoIntrinsic>(
I))
618 if (!isa<DbgInfoIntrinsic>(
I))
640 #define HANDLE_TERM_INST(N, OPC, CLASS) \ 641 case Instruction::OPC: \ 642 return static_cast<const CLASS *>(this)->getNumSuccessors(); 643 #include "llvm/IR/Instruction.def" 652 #define HANDLE_TERM_INST(N, OPC, CLASS) \ 653 case Instruction::OPC: \ 654 return static_cast<const CLASS *>(this)->getSuccessor(idx); 655 #include "llvm/IR/Instruction.def" 664 #define HANDLE_TERM_INST(N, OPC, CLASS) \ 665 case Instruction::OPC: \ 666 return static_cast<CLASS *>(this)->setSuccessor(idx, B); 667 #include "llvm/IR/Instruction.def" 685 if (MDName->
getString() !=
"branch_weights")
701 for (
unsigned M : WL)
708 for (
const auto &MD : TheMDs) {
709 if (WL.empty() || WLS.
count(MD.first))
721 #define HANDLE_INST(num, opc, clas) \ 722 case Instruction::opc: \ 723 New = cast<clas>(this)->cloneImpl(); \ 725 #include "llvm/IR/Instruction.def" 736 if (ProfileData ==
nullptr)
740 if (!ProfDataName || (!ProfDataName->getString().equals(
"branch_weights") &&
741 !ProfDataName->getString().equals(
"VP")))
746 Vals.
push_back(ProfileData->getOperand(0));
747 APInt APS(128, S), APT(128, T);
748 if (ProfDataName->getString().equals(
"branch_weights"))
749 for (
unsigned i = 1; i < ProfileData->getNumOperands(); i++) {
752 mdconst::dyn_extract<ConstantInt>(ProfileData->getOperand(i))
758 Val.udiv(APT).getLimitedValue())));
760 else if (ProfDataName->getString().equals(
"VP"))
761 for (
unsigned i = 1; i < ProfileData->getNumOperands(); i += 2) {
763 Vals.
push_back(ProfileData->getOperand(i));
766 mdconst::dyn_extract<ConstantInt>(ProfileData->getOperand(i + 1))
772 Val.udiv(APT).getLimitedValue())));
778 assert((isa<CallInst>(
this) || isa<InvokeInst>(
this)) &&
779 "Can only set weights for call and invoke instrucitons");
void getAllMetadataOtherThanDebugLoc(SmallVectorImpl< std::pair< unsigned, MDNode *>> &MDs) const
This does the same thing as getAllMetadata, except that it filters out the debug location.
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
bool hasNoInfs() const
Determine whether the no-infs flag is set.
void copyFastMathFlags(FastMathFlags FMF)
Convenience function for transferring all fast-math flag values to this instruction, which must be an operator which supports these flags.
This class is the base class for the comparison instructions.
const Instruction * getPrevNonDebugInstruction() const
Return a pointer to the previous non-debug instruction in the same basic block as 'this'...
void setFastMathFlags(FastMathFlags FMF)
Convenience function for setting multiple fast-math flags on this instruction, which must be an opera...
iterator_range< use_iterator > uses()
bool hasNoSignedZeros() const
Determine whether the no-signed-zeros flag is set.
bool isSameOperationAs(const Instruction *I, unsigned flags=0) const
This function determines if the specified instruction executes the same operation as the current one...
Instruction * getNextNode()
Get the next node, or nullptr for the list tail.
iterator erase(iterator where)
This class represents lattice values for constants.
bool isAtomic() const
Return true if this instruction has an AtomicOrdering of unordered or higher.
ConstantAsMetadata * createConstant(Constant *C)
Return the given constant as metadata.
A Module instance is used to store all the information related to an LLVM module. ...
BasicBlock * getSuccessor(unsigned Idx) const
Return the specified successor. This instruction must be a terminator.
An instruction for ordering other memory operations.
an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.
void push_back(const T &Elt)
bool isSafeToRemove() const
Return true if the instruction can be removed if the result is unused.
void setProfWeight(uint64_t W)
Sets the branch_weights metadata to W for CallInst.
This class represents a function call, abstracting a target machine's calling convention.
void setHasNoNaNs(bool B)
Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag...
bool mayWriteToMemory() const
Return true if this instruction may modify memory.
bool hasAtomicLoad() const
Return true if this atomic instruction loads from memory.
LLVMContext & getContext() const
All values hold a context through their type.
bool isTerminator() const
const MDOperand & getOperand(unsigned I) const
An instruction for reading from memory.
static IntegerType * getInt64Ty(LLVMContext &C)
an instruction that atomically reads a memory location, combines it with another value, and then stores the result back.
void setSuccessor(unsigned Idx, BasicBlock *BB)
Update the specified successor to point at the provided block.
void copyIRFlags(const Value *V, bool IncludeWrapFlags=true)
Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this...
bool hasNoSignedWrap() const
Determine whether the no signed wrap flag is set.
Instruction * getPrevNode()
bool isIdenticalTo(const Instruction *I) const
Return true if the specified instruction is exactly identical to the current one. ...
bool hasAllowContract() const
Determine whether the allow-contract flag is set.
void setHasApproxFunc(bool B)
Set or clear the approximate-math-functions flag on this instruction, which must be an operator which...
const Module * getModule() const
Return the module owning the function this basic block belongs to, or nullptr if the function does no...
static uint32_t getAlignment(const MCSectionCOFF &Sec)
bool hasAllowReciprocal() const
Determine whether the allow-reciprocal flag is set.
A Use represents the edge between a Value definition and its users.
void dropPoisonGeneratingFlags()
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs...
bool hasApproxFunc() const
Determine whether the approximate-math-functions flag is set.
bool hasMetadata() const
Return true if this instruction has any metadata attached to it.
Check for equivalence ignoring load/store alignment.
block_iterator block_begin()
AttributeList getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
Instruction * clone() const
Create a copy of 'this' instruction that is identical in all ways except the following: ...
FastMathFlags getFastMathFlags() const
Convenience function for getting all the fast-math flags, which must be an operator which supports th...
void setIsExact(bool b=true)
Set or clear the exact flag on this instruction, which must be an operator which supports this flag...
Type * getType() const
All values are typed, get the type of this value.
Check for equivalence treating a type and a vector of that type as equivalent.
LLVMContext & getContext() const
void andIRFlags(const Value *V)
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction...
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
An instruction for storing to memory.
unsigned getNumSuccessors() const
Return the number of successors that this instruction has.
Value * getOperand(unsigned i) const
void setFast(bool B)
Set or clear all fast-math-flags on this instruction, which must be an operator which supports this f...
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
AttributeSet getAttributes(unsigned Index) const
The attributes for the specified index are returned.
StringRef getString() const
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata *> MDs)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void setDebugLoc(DebugLoc Loc)
Set the debug location information for this instruction.
bool isIdenticalToWhenDefined(const Instruction *I) const
This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined.
void insertBefore(Instruction *InsertPos)
Insert an unlinked instruction into a basic block immediately before the specified instruction...
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
const char * getOpcodeName() const
static bool haveSameSpecialState(const Instruction *I1, const Instruction *I2, bool IgnoreAlignment=false)
Return true if both instructions have the same special state.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
std::pair< iterator, bool > insert(const ValueT &V)
bool mayHaveSideEffects() const
Return true if the instruction may have side effects.
bool mayThrow() const
Return true if this instruction may throw an exception.
const Instruction * getNextNonDebugInstruction() const
Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists.
bool isAssociative() const LLVM_READONLY
Return true if the instruction is associative:
bool isLifetimeStartOrEnd() const
Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker.
void splice(iterator where, iplist_impl &L2)
bool isFast() const
Determine whether all fast-math-flags are set.
self_iterator getIterator()
void setHasNoInfs(bool B)
Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag...
const Function * getFunction() const
Return the function this instruction belongs to.
MDNode * createBranchWeights(uint32_t TrueWeight, uint32_t FalseWeight)
Return metadata containing two branch weights.
bool isExact() const
Determine whether the exact flag is set.
void swapProfMetadata()
If the instruction has "branch_weights" MD_prof metadata and the MDNode has three operands (including...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void setMetadata(unsigned KindID, MDNode *Node)
Set the metadata of the specified kind to the specified node.
unsigned char SubclassOptionalData
Hold subclass data that can be dropped.
const InstListType & getInstList() const
Return the underlying instruction list container.
void setHasNoSignedWrap(bool b=true)
Set or clear the nsw flag on this instruction, which must be an operator which supports this flag...
Predicate getPredicate(unsigned Condition, unsigned Hint)
Return predicate consisting of specified condition and hint bits.
Iterator for intrusive lists based on ilist_node.
unsigned getNumOperands() const
void setHasAllowReassoc(bool B)
Set or clear the reassociation flag on this instruction, which must be an operator which supports thi...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
bool isUsedOutsideOfBlock(const BasicBlock *BB) const
Return true if there are any uses of this instruction in blocks other than the specified block...
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
Class for arbitrary precision integers.
void push_back(pointer val)
static bool isWeak(const MCSymbolELF &Sym)
void removeFromParent()
This method unlinks 'this' from the containing basic block, but does not delete it.
pointer remove(iterator &IT)
List that automatically updates parent links and symbol tables.
iterator insert(iterator where, pointer New)
const DebugLoc & getDebugLoc() const
Return the debug location for this node as a DebugLoc.
void updateProfWeight(uint64_t S, uint64_t T)
Updates branch_weights metadata by scaling it by S / T.
const Function * getParent() const
Return the enclosing method, or null if none.
void insertAfter(Instruction *InsertPos)
Insert an unlinked instruction into a basic block immediately after the specified instruction...
bool mayReadFromMemory() const
Return true if this instruction may read memory.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
bool hasNoUnsignedWrap() const
Determine whether the no unsigned wrap flag is set.
Instruction(const Instruction &)=delete
void setHasNoUnsignedWrap(bool b=true)
Set or clear the nuw flag on this instruction, which must be an operator which supports this flag...
bool hasAtomicStore() const
Return true if this atomic instruction stores to memory.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void moveAfter(Instruction *MovePos)
Unlink this instruction from its current basic block and insert it into the basic block that MovePos ...
LLVM Value Representation.
bool hasAllowReassoc() const
Determine whether the allow-reassociation flag is set.
void copyMetadata(const Instruction &SrcInst, ArrayRef< unsigned > WL=ArrayRef< unsigned >())
Copy metadata from SrcInst to this instruction.
void moveBefore(Instruction *MovePos)
Unlink this instruction from its current basic block and insert it into the basic block that MovePos ...
bool hasNoNaNs() const
Determine whether the no-NaNs flag is set.
Convenience struct for specifying and reasoning about fast-math flags.
static bool isVolatile(Instruction *Inst)
void setHasNoSignedZeros(bool B)
Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports t...
unsigned getNumOperands() const
Return number of MDNode operands.
iterator insertAfter(iterator where, pointer New)
void setHasAllowReciprocal(bool B)
Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports ...
A wrapper class for inspecting calls to intrinsic functions.
const BasicBlock * getParent() const
an instruction to allocate memory on the stack
This instruction inserts a struct field of array element value into an aggregate value.