#include "llvm/IR/Instructions.h"
#include "LLVMContextImpl.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/ProfDataUtils.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CheckedArithmetic.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ModRef.h"
#include "llvm/Support/TypeSize.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <optional>
#include <vector>
usingnamespacellvm;
static cl::opt<bool> DisableI2pP2iOpt(
"disable-i2p-p2i-opt", cl::init(false),
cl::desc("Disables inttoptr/ptrtoint roundtrip optimization"));
std::optional<TypeSize>
AllocaInst::getAllocationSize(const DataLayout &DL) const { … }
std::optional<TypeSize>
AllocaInst::getAllocationSizeInBits(const DataLayout &DL) const { … }
const char *SelectInst::areInvalidOperands(Value *Op0, Value *Op1, Value *Op2) { … }
PHINode::PHINode(const PHINode &PN)
: … { … }
Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) { … }
void PHINode::removeIncomingValueIf(function_ref<bool(unsigned)> Predicate,
bool DeletePHIIfEmpty) { … }
void PHINode::growOperands() { … }
Value *PHINode::hasConstantValue() const { … }
bool PHINode::hasConstantOrUndefValue() const { … }
LandingPadInst::LandingPadInst(Type *RetTy, unsigned NumReservedValues,
const Twine &NameStr,
InsertPosition InsertBefore)
: … { … }
LandingPadInst::LandingPadInst(const LandingPadInst &LP)
: … { … }
LandingPadInst *LandingPadInst::Create(Type *RetTy, unsigned NumReservedClauses,
const Twine &NameStr,
InsertPosition InsertBefore) { … }
void LandingPadInst::init(unsigned NumReservedValues, const Twine &NameStr) { … }
void LandingPadInst::growOperands(unsigned Size) { … }
void LandingPadInst::addClause(Constant *Val) { … }
CallBase *CallBase::Create(CallBase *CB, ArrayRef<OperandBundleDef> Bundles,
InsertPosition InsertPt) { … }
CallBase *CallBase::Create(CallBase *CI, OperandBundleDef OpB,
InsertPosition InsertPt) { … }
Function *CallBase::getCaller() { … }
unsigned CallBase::getNumSubclassExtraOperandsDynamic() const { … }
bool CallBase::isIndirectCall() const { … }
bool CallBase::isMustTailCall() const { … }
bool CallBase::isTailCall() const { … }
Intrinsic::ID CallBase::getIntrinsicID() const { … }
FPClassTest CallBase::getRetNoFPClass() const { … }
FPClassTest CallBase::getParamNoFPClass(unsigned i) const { … }
std::optional<ConstantRange> CallBase::getRange() const { … }
bool CallBase::isReturnNonNull() const { … }
Value *CallBase::getArgOperandWithAttribute(Attribute::AttrKind Kind) const { … }
bool CallBase::paramHasAttr(unsigned ArgNo, Attribute::AttrKind Kind) const { … }
bool CallBase::hasFnAttrOnCalledFunction(Attribute::AttrKind Kind) const { … }
bool CallBase::hasFnAttrOnCalledFunction(StringRef Kind) const { … }
template <typename AK>
Attribute CallBase::getFnAttrOnCalledFunction(AK Kind) const { … }
template Attribute
CallBase::getFnAttrOnCalledFunction(Attribute::AttrKind Kind) const;
template Attribute CallBase::getFnAttrOnCalledFunction(StringRef Kind) const;
template <typename AK>
Attribute CallBase::getParamAttrOnCalledFunction(unsigned ArgNo,
AK Kind) const { … }
template Attribute
CallBase::getParamAttrOnCalledFunction(unsigned ArgNo,
Attribute::AttrKind Kind) const;
template Attribute CallBase::getParamAttrOnCalledFunction(unsigned ArgNo,
StringRef Kind) const;
void CallBase::getOperandBundlesAsDefs(
SmallVectorImpl<OperandBundleDef> &Defs) const { … }
CallBase::op_iterator
CallBase::populateBundleOperandInfos(ArrayRef<OperandBundleDef> Bundles,
const unsigned BeginIndex) { … }
CallBase::BundleOpInfo &CallBase::getBundleOpInfoForOperand(unsigned OpIdx) { … }
CallBase *CallBase::addOperandBundle(CallBase *CB, uint32_t ID,
OperandBundleDef OB,
InsertPosition InsertPt) { … }
CallBase *CallBase::removeOperandBundle(CallBase *CB, uint32_t ID,
InsertPosition InsertPt) { … }
bool CallBase::hasReadingOperandBundles() const { … }
bool CallBase::hasClobberingOperandBundles() const { … }
MemoryEffects CallBase::getMemoryEffects() const { … }
void CallBase::setMemoryEffects(MemoryEffects ME) { … }
bool CallBase::doesNotAccessMemory() const { … }
void CallBase::setDoesNotAccessMemory() { … }
bool CallBase::onlyReadsMemory() const { … }
void CallBase::setOnlyReadsMemory() { … }
bool CallBase::onlyWritesMemory() const { … }
void CallBase::setOnlyWritesMemory() { … }
bool CallBase::onlyAccessesArgMemory() const { … }
void CallBase::setOnlyAccessesArgMemory() { … }
bool CallBase::onlyAccessesInaccessibleMemory() const { … }
void CallBase::setOnlyAccessesInaccessibleMemory() { … }
bool CallBase::onlyAccessesInaccessibleMemOrArgMem() const { … }
void CallBase::setOnlyAccessesInaccessibleMemOrArgMem() { … }
void CallInst::init(FunctionType *FTy, Value *Func, ArrayRef<Value *> Args,
ArrayRef<OperandBundleDef> Bundles, const Twine &NameStr) { … }
void CallInst::init(FunctionType *FTy, Value *Func, const Twine &NameStr) { … }
CallInst::CallInst(FunctionType *Ty, Value *Func, const Twine &Name,
AllocInfo AllocInfo, InsertPosition InsertBefore)
: … { … }
CallInst::CallInst(const CallInst &CI, AllocInfo AllocInfo)
: … { … }
CallInst *CallInst::Create(CallInst *CI, ArrayRef<OperandBundleDef> OpB,
InsertPosition InsertPt) { … }
void CallInst::updateProfWeight(uint64_t S, uint64_t T) { … }
void InvokeInst::init(FunctionType *FTy, Value *Fn, BasicBlock *IfNormal,
BasicBlock *IfException, ArrayRef<Value *> Args,
ArrayRef<OperandBundleDef> Bundles,
const Twine &NameStr) { … }
InvokeInst::InvokeInst(const InvokeInst &II, AllocInfo AllocInfo)
: … { … }
InvokeInst *InvokeInst::Create(InvokeInst *II, ArrayRef<OperandBundleDef> OpB,
InsertPosition InsertPt) { … }
LandingPadInst *InvokeInst::getLandingPadInst() const { … }
void InvokeInst::updateProfWeight(uint64_t S, uint64_t T) { … }
void CallBrInst::init(FunctionType *FTy, Value *Fn, BasicBlock *Fallthrough,
ArrayRef<BasicBlock *> IndirectDests,
ArrayRef<Value *> Args,
ArrayRef<OperandBundleDef> Bundles,
const Twine &NameStr) { … }
CallBrInst::CallBrInst(const CallBrInst &CBI, AllocInfo AllocInfo)
: … { … }
CallBrInst *CallBrInst::Create(CallBrInst *CBI, ArrayRef<OperandBundleDef> OpB,
InsertPosition InsertPt) { … }
ReturnInst::ReturnInst(const ReturnInst &RI, AllocInfo AllocInfo)
: … { … }
ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, AllocInfo AllocInfo,
InsertPosition InsertBefore)
: … { … }
ResumeInst::ResumeInst(const ResumeInst &RI)
: … { … }
ResumeInst::ResumeInst(Value *Exn, InsertPosition InsertBefore)
: … { … }
CleanupReturnInst::CleanupReturnInst(const CleanupReturnInst &CRI,
AllocInfo AllocInfo)
: … { … }
void CleanupReturnInst::init(Value *CleanupPad, BasicBlock *UnwindBB) { … }
CleanupReturnInst::CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB,
AllocInfo AllocInfo,
InsertPosition InsertBefore)
: … { … }
void CatchReturnInst::init(Value *CatchPad, BasicBlock *BB) { … }
CatchReturnInst::CatchReturnInst(const CatchReturnInst &CRI)
: … { … }
CatchReturnInst::CatchReturnInst(Value *CatchPad, BasicBlock *BB,
InsertPosition InsertBefore)
: … { … }
CatchSwitchInst::CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
unsigned NumReservedValues,
const Twine &NameStr,
InsertPosition InsertBefore)
: … { … }
CatchSwitchInst::CatchSwitchInst(const CatchSwitchInst &CSI)
: … { … }
void CatchSwitchInst::init(Value *ParentPad, BasicBlock *UnwindDest,
unsigned NumReservedValues) { … }
void CatchSwitchInst::growOperands(unsigned Size) { … }
void CatchSwitchInst::addHandler(BasicBlock *Handler) { … }
void CatchSwitchInst::removeHandler(handler_iterator HI) { … }
void FuncletPadInst::init(Value *ParentPad, ArrayRef<Value *> Args,
const Twine &NameStr) { … }
FuncletPadInst::FuncletPadInst(const FuncletPadInst &FPI, AllocInfo AllocInfo)
: … { … }
FuncletPadInst::FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad,
ArrayRef<Value *> Args, AllocInfo AllocInfo,
const Twine &NameStr,
InsertPosition InsertBefore)
: … { … }
UnreachableInst::UnreachableInst(LLVMContext &Context,
InsertPosition InsertBefore)
: … { … }
void BranchInst::AssertOK() { … }
BranchInst::BranchInst(BasicBlock *IfTrue, AllocInfo AllocInfo,
InsertPosition InsertBefore)
: … { … }
BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
AllocInfo AllocInfo, InsertPosition InsertBefore)
: … { … }
BranchInst::BranchInst(const BranchInst &BI, AllocInfo AllocInfo)
: … { … }
void BranchInst::swapSuccessors() { … }
static Value *getAISize(LLVMContext &Context, Value *Amt) { … }
static Align computeAllocaDefaultAlign(Type *Ty, InsertPosition Pos) { … }
AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
const Twine &Name, InsertPosition InsertBefore)
: … { … }
AllocaInst::AllocaInst(Type *Ty, unsigned AddrSpace, Value *ArraySize,
Align Align, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
bool AllocaInst::isArrayAllocation() const { … }
bool AllocaInst::isStaticAlloca() const { … }
void LoadInst::AssertOK() { … }
static Align computeLoadStoreDefaultAlign(Type *Ty, InsertPosition Pos) { … }
LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name,
InsertPosition InsertBef)
: … { … }
LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
InsertPosition InsertBef)
: … { … }
LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
Align Align, InsertPosition InsertBef)
: … { … }
LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
Align Align, AtomicOrdering Order, SyncScope::ID SSID,
InsertPosition InsertBef)
: … { … }
void StoreInst::AssertOK() { … }
StoreInst::StoreInst(Value *val, Value *addr, InsertPosition InsertBefore)
: … { … }
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
InsertPosition InsertBefore)
: … { … }
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align,
InsertPosition InsertBefore)
: … { … }
StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, Align Align,
AtomicOrdering Order, SyncScope::ID SSID,
InsertPosition InsertBefore)
: … { … }
void AtomicCmpXchgInst::Init(Value *Ptr, Value *Cmp, Value *NewVal,
Align Alignment, AtomicOrdering SuccessOrdering,
AtomicOrdering FailureOrdering,
SyncScope::ID SSID) { … }
AtomicCmpXchgInst::AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal,
Align Alignment,
AtomicOrdering SuccessOrdering,
AtomicOrdering FailureOrdering,
SyncScope::ID SSID,
InsertPosition InsertBefore)
: … { … }
void AtomicRMWInst::Init(BinOp Operation, Value *Ptr, Value *Val,
Align Alignment, AtomicOrdering Ordering,
SyncScope::ID SSID) { … }
AtomicRMWInst::AtomicRMWInst(BinOp Operation, Value *Ptr, Value *Val,
Align Alignment, AtomicOrdering Ordering,
SyncScope::ID SSID, InsertPosition InsertBefore)
: … { … }
StringRef AtomicRMWInst::getOperationName(BinOp Op) { … }
FenceInst::FenceInst(LLVMContext &C, AtomicOrdering Ordering,
SyncScope::ID SSID, InsertPosition InsertBefore)
: … { … }
void GetElementPtrInst::init(Value *Ptr, ArrayRef<Value *> IdxList,
const Twine &Name) { … }
GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI,
AllocInfo AllocInfo)
: … { … }
Type *GetElementPtrInst::getTypeAtIndex(Type *Ty, Value *Idx) { … }
Type *GetElementPtrInst::getTypeAtIndex(Type *Ty, uint64_t Idx) { … }
template <typename IndexTy>
static Type *getIndexedTypeInternal(Type *Ty, ArrayRef<IndexTy> IdxList) { … }
Type *GetElementPtrInst::getIndexedType(Type *Ty, ArrayRef<Value *> IdxList) { … }
Type *GetElementPtrInst::getIndexedType(Type *Ty,
ArrayRef<Constant *> IdxList) { … }
Type *GetElementPtrInst::getIndexedType(Type *Ty, ArrayRef<uint64_t> IdxList) { … }
bool GetElementPtrInst::hasAllZeroIndices() const { … }
bool GetElementPtrInst::hasAllConstantIndices() const { … }
void GetElementPtrInst::setNoWrapFlags(GEPNoWrapFlags NW) { … }
void GetElementPtrInst::setIsInBounds(bool B) { … }
GEPNoWrapFlags GetElementPtrInst::getNoWrapFlags() const { … }
bool GetElementPtrInst::isInBounds() const { … }
bool GetElementPtrInst::hasNoUnsignedSignedWrap() const { … }
bool GetElementPtrInst::hasNoUnsignedWrap() const { … }
bool GetElementPtrInst::accumulateConstantOffset(const DataLayout &DL,
APInt &Offset) const { … }
bool GetElementPtrInst::collectOffset(
const DataLayout &DL, unsigned BitWidth,
SmallMapVector<Value *, APInt, 4> &VariableOffsets,
APInt &ConstantOffset) const { … }
ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
const Twine &Name,
InsertPosition InsertBef)
: … { … }
bool ExtractElementInst::isValidOperands(const Value *Val, const Value *Index) { … }
InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, Value *Index,
const Twine &Name,
InsertPosition InsertBef)
: … { … }
bool InsertElementInst::isValidOperands(const Value *Vec, const Value *Elt,
const Value *Index) { … }
static Value *createPlaceholderForShuffleVector(Value *V) { … }
ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *Mask, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
ShuffleVectorInst::ShuffleVectorInst(Value *V1, ArrayRef<int> Mask,
const Twine &Name,
InsertPosition InsertBefore)
: … { … }
ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
const Twine &Name,
InsertPosition InsertBefore)
: … { … }
ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, ArrayRef<int> Mask,
const Twine &Name,
InsertPosition InsertBefore)
: … { … }
void ShuffleVectorInst::commute() { … }
bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2,
ArrayRef<int> Mask) { … }
bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2,
const Value *Mask) { … }
void ShuffleVectorInst::getShuffleMask(const Constant *Mask,
SmallVectorImpl<int> &Result) { … }
void ShuffleVectorInst::setShuffleMask(ArrayRef<int> Mask) { … }
Constant *ShuffleVectorInst::convertShuffleMaskForBitcode(ArrayRef<int> Mask,
Type *ResultTy) { … }
static bool isSingleSourceMaskImpl(ArrayRef<int> Mask, int NumOpElts) { … }
bool ShuffleVectorInst::isSingleSourceMask(ArrayRef<int> Mask, int NumSrcElts) { … }
static bool isIdentityMaskImpl(ArrayRef<int> Mask, int NumOpElts) { … }
bool ShuffleVectorInst::isIdentityMask(ArrayRef<int> Mask, int NumSrcElts) { … }
bool ShuffleVectorInst::isReverseMask(ArrayRef<int> Mask, int NumSrcElts) { … }
bool ShuffleVectorInst::isZeroEltSplatMask(ArrayRef<int> Mask, int NumSrcElts) { … }
bool ShuffleVectorInst::isSelectMask(ArrayRef<int> Mask, int NumSrcElts) { … }
bool ShuffleVectorInst::isTransposeMask(ArrayRef<int> Mask, int NumSrcElts) { … }
bool ShuffleVectorInst::isSpliceMask(ArrayRef<int> Mask, int NumSrcElts,
int &Index) { … }
bool ShuffleVectorInst::isExtractSubvectorMask(ArrayRef<int> Mask,
int NumSrcElts, int &Index) { … }
bool ShuffleVectorInst::isInsertSubvectorMask(ArrayRef<int> Mask,
int NumSrcElts, int &NumSubElts,
int &Index) { … }
bool ShuffleVectorInst::isIdentityWithPadding() const { … }
bool ShuffleVectorInst::isIdentityWithExtract() const { … }
bool ShuffleVectorInst::isConcat() const { … }
static bool isReplicationMaskWithParams(ArrayRef<int> Mask,
int ReplicationFactor, int VF) { … }
bool ShuffleVectorInst::isReplicationMask(ArrayRef<int> Mask,
int &ReplicationFactor, int &VF) { … }
bool ShuffleVectorInst::isReplicationMask(int &ReplicationFactor,
int &VF) const { … }
bool ShuffleVectorInst::isOneUseSingleSourceMask(ArrayRef<int> Mask, int VF) { … }
bool ShuffleVectorInst::isOneUseSingleSourceMask(int VF) const { … }
bool ShuffleVectorInst::isInterleave(unsigned Factor) { … }
bool ShuffleVectorInst::isInterleaveMask(
ArrayRef<int> Mask, unsigned Factor, unsigned NumInputElts,
SmallVectorImpl<unsigned> &StartIndexes) { … }
bool ShuffleVectorInst::isDeInterleaveMaskOfFactor(ArrayRef<int> Mask,
unsigned Factor,
unsigned &Index) { … }
static int matchShuffleAsBitRotate(ArrayRef<int> Mask, int NumSubElts) { … }
bool ShuffleVectorInst::isBitRotateMask(
ArrayRef<int> Mask, unsigned EltSizeInBits, unsigned MinSubElts,
unsigned MaxSubElts, unsigned &NumSubElts, unsigned &RotateAmt) { … }
void InsertValueInst::init(Value *Agg, Value *Val, ArrayRef<unsigned> Idxs,
const Twine &Name) { … }
InsertValueInst::InsertValueInst(const InsertValueInst &IVI)
: … { … }
void ExtractValueInst::init(ArrayRef<unsigned> Idxs, const Twine &Name) { … }
ExtractValueInst::ExtractValueInst(const ExtractValueInst &EVI)
: … { … }
Type *ExtractValueInst::getIndexedType(Type *Agg,
ArrayRef<unsigned> Idxs) { … }
UnaryOperator::UnaryOperator(UnaryOps iType, Value *S, Type *Ty,
const Twine &Name, InsertPosition InsertBefore)
: … { … }
UnaryOperator *UnaryOperator::Create(UnaryOps Op, Value *S, const Twine &Name,
InsertPosition InsertBefore) { … }
void UnaryOperator::AssertOK() { … }
BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
const Twine &Name, InsertPosition InsertBefore)
: … { … }
void BinaryOperator::AssertOK() { … }
BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2,
const Twine &Name,
InsertPosition InsertBefore) { … }
BinaryOperator *BinaryOperator::CreateNeg(Value *Op, const Twine &Name,
InsertPosition InsertBefore) { … }
BinaryOperator *BinaryOperator::CreateNSWNeg(Value *Op, const Twine &Name,
InsertPosition InsertBefore) { … }
BinaryOperator *BinaryOperator::CreateNot(Value *Op, const Twine &Name,
InsertPosition InsertBefore) { … }
bool BinaryOperator::swapOperands() { … }
float FPMathOperator::getFPAccuracy() const { … }
bool CastInst::isIntegerCast() const { … }
bool CastInst::isNoopCast(Instruction::CastOps Opcode,
Type *SrcTy,
Type *DestTy,
const DataLayout &DL) { … }
bool CastInst::isNoopCast(const DataLayout &DL) const { … }
unsigned CastInst::isEliminableCastPair(
Instruction::CastOps firstOp, Instruction::CastOps secondOp,
Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy,
Type *DstIntPtrTy) { … }
CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty,
const Twine &Name, InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateZExtOrBitCast(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateSExtOrBitCast(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateTruncOrBitCast(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreatePointerBitCastOrAddrSpaceCast(
Value *S, Type *Ty, const Twine &Name, InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateBitOrPointerCast(Value *S, Type *Ty,
const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateIntegerCast(Value *C, Type *Ty, bool isSigned,
const Twine &Name,
InsertPosition InsertBefore) { … }
CastInst *CastInst::CreateFPCast(Value *C, Type *Ty, const Twine &Name,
InsertPosition InsertBefore) { … }
bool CastInst::isBitCastable(Type *SrcTy, Type *DestTy) { … }
bool CastInst::isBitOrNoopPointerCastable(Type *SrcTy, Type *DestTy,
const DataLayout &DL) { … }
Instruction::CastOps
CastInst::getCastOpcode(
const Value *Src, bool SrcIsSigned, Type *DestTy, bool DestIsSigned) { … }
bool
CastInst::castIsValid(Instruction::CastOps op, Type *SrcTy, Type *DstTy) { … }
TruncInst::TruncInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
ZExtInst::ZExtInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
SExtInst::SExtInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
FPTruncInst::FPTruncInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
FPExtInst::FPExtInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
UIToFPInst::UIToFPInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
SIToFPInst::SIToFPInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
FPToUIInst::FPToUIInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
FPToSIInst::FPToSIInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
PtrToIntInst::PtrToIntInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
IntToPtrInst::IntToPtrInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
BitCastInst::BitCastInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
AddrSpaceCastInst::AddrSpaceCastInst(Value *S, Type *Ty, const Twine &Name,
InsertPosition InsertBefore)
: … { … }
CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS,
Value *RHS, const Twine &Name, InsertPosition InsertBefore,
Instruction *FlagsSource)
: … { … }
CmpInst *CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
const Twine &Name, InsertPosition InsertBefore) { … }
CmpInst *CmpInst::CreateWithCopiedFlags(OtherOps Op, Predicate Pred, Value *S1,
Value *S2,
const Instruction *FlagsSource,
const Twine &Name,
InsertPosition InsertBefore) { … }
void CmpInst::swapOperands() { … }
bool CmpInst::isCommutative() const { … }
bool CmpInst::isEquality(Predicate P) { … }
CmpInst::Predicate CmpInst::getInversePredicate(Predicate pred) { … }
StringRef CmpInst::getPredicateName(Predicate Pred) { … }
raw_ostream &llvm::operator<<(raw_ostream &OS, CmpInst::Predicate Pred) { … }
ICmpInst::Predicate ICmpInst::getSignedPredicate(Predicate pred) { … }
ICmpInst::Predicate ICmpInst::getUnsignedPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getSwappedPredicate(Predicate pred) { … }
bool CmpInst::isNonStrictPredicate(Predicate pred) { … }
bool CmpInst::isStrictPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getStrictPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getNonStrictPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getFlippedStrictnessPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getSignedPredicate(Predicate pred) { … }
CmpInst::Predicate CmpInst::getUnsignedPredicate(Predicate pred) { … }
bool CmpInst::isUnsigned(Predicate predicate) { … }
bool CmpInst::isSigned(Predicate predicate) { … }
bool ICmpInst::compare(const APInt &LHS, const APInt &RHS,
ICmpInst::Predicate Pred) { … }
bool FCmpInst::compare(const APFloat &LHS, const APFloat &RHS,
FCmpInst::Predicate Pred) { … }
CmpInst::Predicate CmpInst::getFlippedSignednessPredicate(Predicate pred) { … }
bool CmpInst::isOrdered(Predicate predicate) { … }
bool CmpInst::isUnordered(Predicate predicate) { … }
bool CmpInst::isTrueWhenEqual(Predicate predicate) { … }
bool CmpInst::isFalseWhenEqual(Predicate predicate) { … }
bool CmpInst::isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2) { … }
bool CmpInst::isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2) { … }
void SwitchInst::init(Value *Value, BasicBlock *Default, unsigned NumReserved) { … }
SwitchInst::SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
InsertPosition InsertBefore)
: … { … }
SwitchInst::SwitchInst(const SwitchInst &SI)
: … { … }
void SwitchInst::addCase(ConstantInt *OnVal, BasicBlock *Dest) { … }
SwitchInst::CaseIt SwitchInst::removeCase(CaseIt I) { … }
void SwitchInst::growOperands() { … }
MDNode *SwitchInstProfUpdateWrapper::buildProfBranchWeightsMD() { … }
void SwitchInstProfUpdateWrapper::init() { … }
SwitchInst::CaseIt
SwitchInstProfUpdateWrapper::removeCase(SwitchInst::CaseIt I) { … }
void SwitchInstProfUpdateWrapper::addCase(
ConstantInt *OnVal, BasicBlock *Dest,
SwitchInstProfUpdateWrapper::CaseWeightOpt W) { … }
Instruction::InstListType::iterator
SwitchInstProfUpdateWrapper::eraseFromParent() { … }
SwitchInstProfUpdateWrapper::CaseWeightOpt
SwitchInstProfUpdateWrapper::getSuccessorWeight(unsigned idx) { … }
void SwitchInstProfUpdateWrapper::setSuccessorWeight(
unsigned idx, SwitchInstProfUpdateWrapper::CaseWeightOpt W) { … }
SwitchInstProfUpdateWrapper::CaseWeightOpt
SwitchInstProfUpdateWrapper::getSuccessorWeight(const SwitchInst &SI,
unsigned idx) { … }
void IndirectBrInst::init(Value *Address, unsigned NumDests) { … }
void IndirectBrInst::growOperands() { … }
IndirectBrInst::IndirectBrInst(Value *Address, unsigned NumCases,
InsertPosition InsertBefore)
: … { … }
IndirectBrInst::IndirectBrInst(const IndirectBrInst &IBI)
: … { … }
void IndirectBrInst::addDestination(BasicBlock *DestBB) { … }
void IndirectBrInst::removeDestination(unsigned idx) { … }
FreezeInst::FreezeInst(Value *S, const Twine &Name, InsertPosition InsertBefore)
: … { … }
GetElementPtrInst *GetElementPtrInst::cloneImpl() const { … }
UnaryOperator *UnaryOperator::cloneImpl() const { … }
BinaryOperator *BinaryOperator::cloneImpl() const { … }
FCmpInst *FCmpInst::cloneImpl() const { … }
ICmpInst *ICmpInst::cloneImpl() const { … }
ExtractValueInst *ExtractValueInst::cloneImpl() const { … }
InsertValueInst *InsertValueInst::cloneImpl() const { … }
AllocaInst *AllocaInst::cloneImpl() const { … }
LoadInst *LoadInst::cloneImpl() const { … }
StoreInst *StoreInst::cloneImpl() const { … }
AtomicCmpXchgInst *AtomicCmpXchgInst::cloneImpl() const { … }
AtomicRMWInst *AtomicRMWInst::cloneImpl() const { … }
FenceInst *FenceInst::cloneImpl() const { … }
TruncInst *TruncInst::cloneImpl() const { … }
ZExtInst *ZExtInst::cloneImpl() const { … }
SExtInst *SExtInst::cloneImpl() const { … }
FPTruncInst *FPTruncInst::cloneImpl() const { … }
FPExtInst *FPExtInst::cloneImpl() const { … }
UIToFPInst *UIToFPInst::cloneImpl() const { … }
SIToFPInst *SIToFPInst::cloneImpl() const { … }
FPToUIInst *FPToUIInst::cloneImpl() const { … }
FPToSIInst *FPToSIInst::cloneImpl() const { … }
PtrToIntInst *PtrToIntInst::cloneImpl() const { … }
IntToPtrInst *IntToPtrInst::cloneImpl() const { … }
BitCastInst *BitCastInst::cloneImpl() const { … }
AddrSpaceCastInst *AddrSpaceCastInst::cloneImpl() const { … }
CallInst *CallInst::cloneImpl() const { … }
SelectInst *SelectInst::cloneImpl() const { … }
VAArgInst *VAArgInst::cloneImpl() const { … }
ExtractElementInst *ExtractElementInst::cloneImpl() const { … }
InsertElementInst *InsertElementInst::cloneImpl() const { … }
ShuffleVectorInst *ShuffleVectorInst::cloneImpl() const { … }
PHINode *PHINode::cloneImpl() const { … }
LandingPadInst *LandingPadInst::cloneImpl() const { … }
ReturnInst *ReturnInst::cloneImpl() const { … }
BranchInst *BranchInst::cloneImpl() const { … }
SwitchInst *SwitchInst::cloneImpl() const { … }
IndirectBrInst *IndirectBrInst::cloneImpl() const { … }
InvokeInst *InvokeInst::cloneImpl() const { … }
CallBrInst *CallBrInst::cloneImpl() const { … }
ResumeInst *ResumeInst::cloneImpl() const { … }
CleanupReturnInst *CleanupReturnInst::cloneImpl() const { … }
CatchReturnInst *CatchReturnInst::cloneImpl() const { … }
CatchSwitchInst *CatchSwitchInst::cloneImpl() const { … }
FuncletPadInst *FuncletPadInst::cloneImpl() const { … }
UnreachableInst *UnreachableInst::cloneImpl() const { … }
FreezeInst *FreezeInst::cloneImpl() const { … }