40#define VPINTERNAL_VPLEGAL_CASES \
41 VPINTERNAL_CASE(Legal) \
42 VPINTERNAL_CASE(Discard) \
43 VPINTERNAL_CASE(Convert)
45#define VPINTERNAL_CASE(X) "|" #X
51 ". If non-empty, ignore "
52 "TargetTransformInfo and "
53 "always use this transformation for the %evl parameter (Used in "
59 ". If non-empty, Ignore "
60 "TargetTransformInfo and "
61 "always use this transformation for the %mask parameter (Used in "
65#define VPINTERNAL_CASE(X) .Case(#X, VPLegalization::X)
71#undef VPINTERNAL_VPLEGAL_CASES
78#define DEBUG_TYPE "expandvp"
80STATISTIC(NumFoldedVL,
"Number of folded vector length params");
81STATISTIC(NumLoweredVPOps,
"Number of folded vector predication operations");
88 if (
auto *ConstValue = dyn_cast<Constant>(SplattedVal))
89 return ConstValue->isAllOnesValue();
97 return ConstantInt::get(DivTy, 1u,
false);
102 auto *NewInst = dyn_cast<Instruction>(&NewVal);
103 if (!NewInst || !isa<FPMathOperator>(NewVal))
106 auto *OldFMOp = dyn_cast<FPMathOperator>(&VPI);
110 NewInst->setFastMathFlags(OldFMOp->getFastMathFlags());
123 if (isa<VPReductionIntrinsic>(VPI))
128 .
hasFnAttr(Attribute::AttrKind::Speculatable);
139struct CachingVPExpander {
179 unsigned UnpredicatedIntrinsicID);
183 unsigned UnpredicatedIntrinsicID);
207 bool UsingTTIOverrides;
213 bool expandVectorPredication();
223 for (
unsigned Idx = 0;
Idx < NumElems; ++
Idx)
224 ConstElems.
push_back(ConstantInt::get(LaneTy,
Idx,
false));
236 Type *BoolVecTy = VectorType::get(Builder.
getInt1Ty(), ElemCount);
238 M, Intrinsic::get_active_lane_mask, {BoolVecTy, EVLParam->
getType()});
241 return Builder.
CreateCall(ActiveMaskFunc, {ConstZero, EVLParam});
248 Value *IdxVec = createStepVector(Builder, LaneTy, NumElems);
253CachingVPExpander::expandPredicationInBinaryOperator(
IRBuilder<> &Builder,
256 "Implicitly dropping %evl in non-speculatable operator!");
273 case Instruction::UDiv:
274 case Instruction::SDiv:
275 case Instruction::URem:
276 case Instruction::SRem:
289Value *CachingVPExpander::expandPredicationToIntCall(
291 switch (UnpredicatedIntrinsicID) {
293 case Intrinsic::smax:
294 case Intrinsic::smin:
295 case Intrinsic::umax:
296 case Intrinsic::umin: {
300 VPI.
getModule(), UnpredicatedIntrinsicID, {VPI.getType()});
305 case Intrinsic::bswap:
306 case Intrinsic::bitreverse: {
309 VPI.
getModule(), UnpredicatedIntrinsicID, {VPI.getType()});
318Value *CachingVPExpander::expandPredicationToFPCall(
321 "Implicitly dropping %evl in non-speculatable operator!");
323 switch (UnpredicatedIntrinsicID) {
324 case Intrinsic::fabs:
325 case Intrinsic::sqrt: {
328 VPI.
getModule(), UnpredicatedIntrinsicID, {VPI.getType()});
333 case Intrinsic::maxnum:
334 case Intrinsic::minnum: {
338 VPI.
getModule(), UnpredicatedIntrinsicID, {VPI.getType()});
344 case Intrinsic::fmuladd:
345 case Intrinsic::experimental_constrained_fma:
346 case Intrinsic::experimental_constrained_fmuladd: {
351 VPI.
getModule(), UnpredicatedIntrinsicID, {VPI.getType()});
368 bool Negative =
false;
373 case Intrinsic::vp_reduce_add:
374 case Intrinsic::vp_reduce_or:
375 case Intrinsic::vp_reduce_xor:
376 case Intrinsic::vp_reduce_umax:
378 case Intrinsic::vp_reduce_mul:
379 return ConstantInt::get(EltTy, 1,
false);
380 case Intrinsic::vp_reduce_and:
381 case Intrinsic::vp_reduce_umin:
382 return ConstantInt::getAllOnesValue(EltTy);
383 case Intrinsic::vp_reduce_smin:
386 case Intrinsic::vp_reduce_smax:
389 case Intrinsic::vp_reduce_fmax:
392 case Intrinsic::vp_reduce_fmin: {
399 APFloat::getLargest(Semantics, Negative));
401 case Intrinsic::vp_reduce_fadd:
403 case Intrinsic::vp_reduce_fmul:
404 return ConstantFP::get(EltTy, 1.0);
409CachingVPExpander::expandPredicationInReduction(
IRBuilder<> &Builder,
412 "Implicitly dropping %evl in non-speculatable operator!");
419 auto *NeutralElt = getNeutralReductionElement(VPI, VPI.
getType());
421 cast<VectorType>(RedOp->
getType())->getElementCount(), NeutralElt);
422 RedOp = Builder.
CreateSelect(Mask, RedOp, NeutralVector);
431 case Intrinsic::vp_reduce_add:
435 case Intrinsic::vp_reduce_mul:
439 case Intrinsic::vp_reduce_and:
443 case Intrinsic::vp_reduce_or:
447 case Intrinsic::vp_reduce_xor:
451 case Intrinsic::vp_reduce_smax:
456 case Intrinsic::vp_reduce_smin:
461 case Intrinsic::vp_reduce_umax:
466 case Intrinsic::vp_reduce_umin:
471 case Intrinsic::vp_reduce_fmax:
477 case Intrinsic::vp_reduce_fmin:
483 case Intrinsic::vp_reduce_fadd:
486 case Intrinsic::vp_reduce_fmul:
495Value *CachingVPExpander::expandPredicationToCastIntrinsic(
IRBuilder<> &Builder,
497 Value *CastOp =
nullptr;
501 case Intrinsic::vp_sext:
505 case Intrinsic::vp_zext:
509 case Intrinsic::vp_trunc:
513 case Intrinsic::vp_inttoptr:
517 case Intrinsic::vp_ptrtoint:
521 case Intrinsic::vp_fptosi:
526 case Intrinsic::vp_fptoui:
530 case Intrinsic::vp_sitofp:
534 case Intrinsic::vp_uitofp:
538 case Intrinsic::vp_fptrunc:
542 case Intrinsic::vp_fpext:
552CachingVPExpander::expandPredicationInMemoryIntrinsic(
IRBuilder<> &Builder,
556 const auto &
DL =
F.getParent()->getDataLayout();
565 Value *NewMemoryInst =
nullptr;
569 case Intrinsic::vp_store:
573 if (AlignOpt.has_value())
575 NewMemoryInst = NewStore;
578 DataParam, PtrParam, AlignOpt.
valueOrOne(), MaskParam);
581 case Intrinsic::vp_load:
585 if (AlignOpt.has_value())
587 NewMemoryInst = NewLoad;
593 case Intrinsic::vp_scatter: {
595 cast<VectorType>(DataParam->
getType())->getElementType();
598 AlignOpt.value_or(
DL.getPrefTypeAlign(ElementType)), MaskParam);
601 case Intrinsic::vp_gather: {
605 AlignOpt.value_or(
DL.getPrefTypeAlign(ElementType)), MaskParam,
nullptr,
613 return NewMemoryInst;
616Value *CachingVPExpander::expandPredicationInComparison(
IRBuilder<> &Builder,
619 "Implicitly dropping %evl in non-speculatable operator!");
628 auto *NewCmp = Builder.
CreateCmp(Pred, Op0, Op1);
634void CachingVPExpander::discardEVLParameter(
VPIntrinsic &VPI) {
645 Value *MaxEVL =
nullptr;
655 MaxEVL = Builder.
CreateMul(VScale, FactorConst,
"scalable_size",
675 assert(OldMaskParam &&
"no mask param to fold the vl param into");
676 assert(OldEVLParam &&
"no EVL param to fold away");
683 Value *VLMask = convertEVLToMask(Builder, OldEVLParam, ElemCount);
688 discardEVLParameter(VPI);
690 "transformation did not render the evl param ineffective!");
697 LLVM_DEBUG(
dbgs() <<
"Lowering to unpredicated op: " << VPI <<
'\n');
705 return expandPredicationInBinaryOperator(Builder, VPI);
707 if (
auto *VPRI = dyn_cast<VPReductionIntrinsic>(&VPI))
708 return expandPredicationInReduction(Builder, *VPRI);
710 if (
auto *VPCmp = dyn_cast<VPCmpIntrinsic>(&VPI))
711 return expandPredicationInComparison(Builder, *VPCmp);
714 return expandPredicationToCastIntrinsic(Builder, VPI);
720 case Intrinsic::vp_fneg: {
725 case Intrinsic::vp_abs:
726 case Intrinsic::vp_smax:
727 case Intrinsic::vp_smin:
728 case Intrinsic::vp_umax:
729 case Intrinsic::vp_umin:
730 case Intrinsic::vp_bswap:
731 case Intrinsic::vp_bitreverse:
732 return expandPredicationToIntCall(Builder, VPI,
734 case Intrinsic::vp_fabs:
735 case Intrinsic::vp_sqrt:
736 case Intrinsic::vp_maxnum:
737 case Intrinsic::vp_minnum:
738 case Intrinsic::vp_maximum:
739 case Intrinsic::vp_minimum:
740 case Intrinsic::vp_fma:
741 case Intrinsic::vp_fmuladd:
742 return expandPredicationToFPCall(Builder, VPI,
744 case Intrinsic::vp_load:
745 case Intrinsic::vp_store:
746 case Intrinsic::vp_gather:
747 case Intrinsic::vp_scatter:
748 return expandPredicationInMemoryIntrinsic(Builder, VPI);
752 if (
Value *Call = expandPredicationToFPCall(Builder, VPI, *CID))
764 : PI(PI), Strategy(InitStrat) {}
791CachingVPExpander::getVPLegalizationStrategy(
const VPIntrinsic &VPI)
const {
806bool CachingVPExpander::expandVectorPredication() {
812 auto *VPI = dyn_cast<VPIntrinsic>(&
I);
815 auto VPStrat = getVPLegalizationStrategy(*VPI);
816 sanitizeStrategy(*VPI, VPStrat);
817 if (!VPStrat.shouldDoNothing())
820 if (Worklist.
empty())
825 <<
" instructions ::::\n");
826 for (TransformJob Job : Worklist) {
828 switch (Job.Strategy.EVLParamStrategy) {
832 discardEVLParameter(*Job.PI);
835 if (foldEVLIntoMask(*Job.PI))
842 switch (Job.Strategy.OpStrategy) {
848 expandPredication(*Job.PI);
854 assert(Job.isDone() &&
"incomplete transformation");
867 const auto *
TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
F);
868 CachingVPExpander VPExpander(
F, *
TTI);
869 return VPExpander.expandVectorPredication();
879char ExpandVectorPredication::ID;
881 "Expand vector predication intrinsics",
false,
false)
888 return new ExpandVectorPredication();
894 CachingVPExpander VPExpander(
F,
TTI);
895 if (!VPExpander.expandVectorPredication())
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Expand Atomic instructions
#define LLVM_LIKELY(EXPR)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
static VPTransform parseOverrideOption(const std::string &TextOpt)
static cl::opt< std::string > MaskTransformOverride("expandvp-override-mask-transform", cl::init(""), cl::Hidden, cl::desc("Options: <empty>" VPINTERNAL_VPLEGAL_CASES ". If non-empty, Ignore " "TargetTransformInfo and " "always use this transformation for the %mask parameter (Used in " "testing)."))
static cl::opt< std::string > EVLTransformOverride("expandvp-override-evl-transform", cl::init(""), cl::Hidden, cl::desc("Options: <empty>" VPINTERNAL_VPLEGAL_CASES ". If non-empty, ignore " "TargetTransformInfo and " "always use this transformation for the %evl parameter (Used in " "testing)."))
static void replaceOperation(Value &NewOp, VPIntrinsic &OldOp)
Transfer all properties from OldOp to NewOp and replace all uses.
static bool isAllTrueMask(Value *MaskVal)
static void transferDecorations(Value &NewVal, VPIntrinsic &VPI)
Transfer operation properties from OldVPI to NewVal.
static bool anyExpandVPOverridesSet()
static bool maySpeculateLanes(VPIntrinsic &VPI)
Expand vector predication intrinsics
static Constant * getSafeDivisor(Type *DivTy)
#define VPINTERNAL_VPLEGAL_CASES
loop Loop Strength Reduction
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
static APInt getSignedMaxValue(unsigned numBits)
Gets maximum signed value of APInt for a specific bit width.
static APInt getSignedMinValue(unsigned numBits)
Gets minimum signed value of APInt for a specific bit width.
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesCFG()
This function should be called by the pass, iff they do not:
bool hasFnAttr(Attribute::AttrKind Kind) const
Return true if the attribute exists for the function.
const Module * getModule() const
Return the module owning the function this basic block belongs to, or nullptr if the function does no...
Represents analyses that only rely on functions' control flow.
@ ICMP_ULT
unsigned less than
ConstantFP - Floating Point Values [float, double].
static Constant * getNegativeZero(Type *Ty)
static Constant * getQNaN(Type *Ty, bool Negative=false, APInt *Payload=nullptr)
static Constant * get(ArrayRef< Constant * > V)
This is an important base class in LLVM.
static Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
This class represents an Operation in the Expression.
Legacy analysis pass which computes a DominatorTree.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Convenience struct for specifying and reasoning about fast-math flags.
FunctionPass class - This class is used to implement most global optimizations.
virtual bool runOnFunction(Function &F)=0
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
CallInst * CreateMulReduce(Value *Src)
Create a vector int mul reduction intrinsic of the source vector.
CallInst * CreateFAddReduce(Value *Acc, Value *Src)
Create a sequential vector fadd reduction intrinsic of the source vector.
Value * CreateBinaryIntrinsic(Intrinsic::ID ID, Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="")
Create a call to intrinsic ID with 2 operands which is mangled on the first type.
IntegerType * getInt1Ty()
Fetch the type representing a single bit.
Value * CreateSIToFP(Value *V, Type *DestTy, const Twine &Name="")
Value * CreateFPTrunc(Value *V, Type *DestTy, const Twine &Name="")
CallInst * CreateAndReduce(Value *Src)
Create a vector int AND reduction intrinsic of the source vector.
Value * CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name="")
Return a vector value that contains.
CallInst * CreateMaskedLoad(Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
Create a call to Masked Load intrinsic.
CallInst * CreateConstrainedFPCall(Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
Value * CreateSelect(Value *C, Value *True, Value *False, const Twine &Name="", Instruction *MDFrom=nullptr)
Value * CreateFPToUI(Value *V, Type *DestTy, const Twine &Name="")
Value * CreateSExt(Value *V, Type *DestTy, const Twine &Name="")
Value * CreateIntToPtr(Value *V, Type *DestTy, const Twine &Name="")
CallInst * CreateAddReduce(Value *Src)
Create a vector int add reduction intrinsic of the source vector.
Value * CreateUIToFP(Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false)
BasicBlock * GetInsertBlock() const
CallInst * CreateXorReduce(Value *Src)
Create a vector int XOR reduction intrinsic of the source vector.
CallInst * CreateOrReduce(Value *Src)
Create a vector int OR reduction intrinsic of the source vector.
CallInst * CreateFPMinReduce(Value *Src)
Create a vector float min reduction intrinsic of the source vector.
CallInst * CreateFPMaxReduce(Value *Src)
Create a vector float max reduction intrinsic of the source vector.
ConstantInt * getInt32(uint32_t C)
Get a constant 32-bit value.
Value * CreateCmp(CmpInst::Predicate Pred, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
LoadInst * CreateLoad(Type *Ty, Value *Ptr, const char *Name)
Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool...
Value * CreateZExt(Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false)
Value * CreateAnd(Value *LHS, Value *RHS, const Twine &Name="")
StoreInst * CreateStore(Value *Val, Value *Ptr, bool isVolatile=false)
CallInst * CreateIntMaxReduce(Value *Src, bool IsSigned=false)
Create a vector integer max reduction intrinsic of the source vector.
CallInst * CreateMaskedStore(Value *Val, Value *Ptr, Align Alignment, Value *Mask)
Create a call to Masked Store intrinsic.
Value * CreateAdd(Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreatePtrToInt(Value *V, Type *DestTy, const Twine &Name="")
Value * CreateTrunc(Value *V, Type *DestTy, const Twine &Name="", bool IsNUW=false, bool IsNSW=false)
Value * CreateOr(Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateBinOp(Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateIntMinReduce(Value *Src, bool IsSigned=false)
Create a vector integer min reduction intrinsic of the source vector.
CallInst * CreateCall(FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args=std::nullopt, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFPExt(Value *V, Type *DestTy, const Twine &Name="")
Value * CreateXor(Value *LHS, Value *RHS, const Twine &Name="")
CallInst * CreateFMulReduce(Value *Acc, Value *Src)
Create a sequential vector fmul reduction intrinsic of the source vector.
Value * CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateFNeg(Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateMul(Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
CallInst * CreateMaskedScatter(Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr)
Create a call to Masked Scatter intrinsic.
CallInst * CreateMaskedGather(Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
Create a call to Masked Gather intrinsic.
Value * CreateFPToSI(Value *V, Type *DestTy, const Twine &Name="")
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
const BasicBlock * getParent() const
InstListType::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
FastMathFlags getFastMathFlags() const LLVM_READONLY
Convenience function for getting all the fast-math flags, which must be an operator which supports th...
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
An instruction for reading from memory.
void setAlignment(Align Align)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void preserveSet()
Mark an analysis set as preserved.
reference emplace_back(ArgTypes &&... Args)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
An instruction for storing to memory.
void setAlignment(Align Align)
A switch()-like statement whose cases are string literals.
Analysis pass providing the TargetTransformInfo.
The instances of the Type class are immutable: once they are created, they are never changed.
const fltSemantics & getFltSemantics() const
bool isIntOrIntVectorTy() const
Return true if this is an integer type or a vector of integer types.
unsigned getScalarSizeInBits() const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static IntegerType * getInt32Ty(LLVMContext &C)
Value * getOperand(unsigned i) const
static bool isVPCast(Intrinsic::ID ID)
CmpInst::Predicate getPredicate() const
This is the common base class for vector predication intrinsics.
std::optional< unsigned > getFunctionalIntrinsicID() const
bool canIgnoreVectorLengthParam() const
void setMaskParam(Value *)
Value * getVectorLengthParam() const
void setVectorLengthParam(Value *)
Value * getMemoryDataParam() const
Value * getMemoryPointerParam() const
std::optional< unsigned > getConstrainedIntrinsicID() const
MaybeAlign getPointerAlignment() const
Value * getMaskParam() const
ElementCount getStaticVectorLength() const
std::optional< unsigned > getFunctionalOpcode() const
This represents vector predication reduction intrinsics.
unsigned getStartParamPos() const
unsigned getVectorParamPos() const
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
LLVMContext & getContext() const
All values hold a context through their type.
StringRef getName() const
Return a constant reference to the value's name.
constexpr ScalarTy getFixedValue() const
constexpr bool isScalable() const
Returns whether the quantity is scaled by a runtime quantity (vscale).
constexpr ScalarTy getKnownMinValue() const
Returns the minimum value this quantity can represent.
self_iterator getIterator()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
bool isConstrainedFPIntrinsic(ID QID)
Returns true if the intrinsic ID is for one of the "Constrained Floating-Point Intrinsics".
AttributeList getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
Function * getDeclaration(Module *M, ID id, ArrayRef< Type * > Tys=std::nullopt)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
initializer< Ty > init(const Ty &Val)
ElementType
The element type of an SRV or UAV resource.
This is an optimization pass for GlobalISel generic memory operations.
FunctionPass * createExpandVectorPredicationPass()
This pass expands the vector predication intrinsics into unpredicated instructions with selects or ju...
void initializeExpandVectorPredicationPass(PassRegistry &)
Value * getSplatValue(const Value *V)
Get splat value if the input is a splat vector or return nullptr.
bool isSafeToSpeculativelyExecuteWithOpcode(unsigned Opcode, const Instruction *Inst, const Instruction *CtxI=nullptr, AssumptionCache *AC=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
This returns the same result as isSafeToSpeculativelyExecute if Opcode is the actual opcode of Inst.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Align valueOrOne() const
For convenience, returns a valid alignment or 1 if undefined.