Home
last modified time | relevance | path

Searched refs:ConstantExpr (Results 1 – 25 of 227) sorted by relevance

12345678910

/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantsContext.h46 class CastConstantExpr final : public ConstantExpr {
49 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in CastConstantExpr()
59 static bool classof(const ConstantExpr *CE) { in classof()
63 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
69 class BinaryConstantExpr final : public ConstantExpr {
73 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr()
86 static bool classof(const ConstantExpr *CE) { in classof()
90 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
97 class ExtractElementConstantExpr final : public ConstantExpr {
100 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
[all …]
H A DConstantFold.cpp47 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
85 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
125 return ConstantExpr::isDesirableCastOp(opc) in foldMaybeUndesirableCast()
126 ? ConstantExpr::getCast(opc, V, DestTy) in foldMaybeUndesirableCast()
151 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction()
181 Constant *C = ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
280 Constant *V1Element = ConstantExpr::getExtractElement(V1, in ConstantFoldSelectInstruction()
282 Constant *V2Element = ConstantExpr::getExtractElement(V2, in ConstantFoldSelectInstruction()
326 if (isa<ConstantExpr>(C)) in ConstantFoldSelectInstruction()
369 if (auto *CE = dyn_cast<ConstantExpr>(Val)) { in ConstantFoldExtractElementInstruction()
[all …]
H A DConstants.cpp316 Constant *C0 = ConstantExpr::getBitCast(const_cast<Constant *>(this), IntTy); in isElementWiseEqual()
317 Constant *C1 = ConstantExpr::getBitCast(cast<Constant>(Y), IntTy); in isElementWiseEqual()
363 if (isa<ConstantExpr>(getAggregateElement(i))) in containsConstantExpression()
408 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
649 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) { in getRelocationInfo()
651 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in getRelocationInfo()
652 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in getRelocationInfo()
830 if (isa<ConstantAggregate>(this) || isa<ConstantExpr>(this)) { in isManifestConstant()
1493 V = ConstantExpr::getInsertElement(PoisonV, V, ConstantInt::get(IdxTy, 0)); in getSplat()
1497 return ConstantExpr::getShuffleVector(V, PoisonV, Zeros); in getSplat()
[all …]
H A DAbstractCallSite.cpp65 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U->getUser())) in AbstractCallSite()
H A DReplaceConstant.cpp22 return isa<ConstantExpr>(U) || isa<ConstantAggregate>(U); in isExpandableUser()
28 if (auto *CE = dyn_cast<ConstantExpr>(C)) { in expandUser()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantFolder.h48 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldBinOp()
49 return ConstantExpr::get(Opc, LC, RC); in FoldBinOp()
60 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldExactBinOp()
61 return ConstantExpr::get(Opc, LC, RC, in FoldExactBinOp()
73 if (ConstantExpr::isDesirableBinOp(Opc)) { in FoldNoWrapBinOp()
79 return ConstantExpr::get(Opc, LC, RC, Flags); in FoldNoWrapBinOp()
108 if (!ConstantExpr::isSupportedGetElementPtr(Ty)) in FoldGEP()
116 return ConstantExpr::getGetElementPtr(Ty, PC, IdxList, NW); in FoldGEP()
150 return ConstantExpr::getExtractElement(CVec, CIdx); in FoldExtractElement()
160 return ConstantExpr::getInsertElement(CVec, CNewElt, CIdx); in FoldInsertElement()
[all …]
H A DOperator.h45 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
53 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
59 static bool classof(const ConstantExpr *) { return true; } in classof() argument
61 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
87 friend class ConstantExpr; variable
132 static bool classof(const ConstantExpr *CE) { in classof()
140 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
160 friend class ConstantExpr;
182 static bool classof(const ConstantExpr *CE) {
190 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DTargetFolder.h59 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldBinOp()
60 return Fold(ConstantExpr::get(Opc, LC, RC)); in FoldBinOp()
71 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldExactBinOp()
72 return Fold(ConstantExpr::get( in FoldExactBinOp()
84 if (ConstantExpr::isDesirableBinOp(Opc)) { in FoldNoWrapBinOp()
90 return Fold(ConstantExpr::get(Opc, LC, RC, Flags)); in FoldNoWrapBinOp()
119 if (!ConstantExpr::isSupportedGetElementPtr(Ty)) in FoldGEP()
126 return Fold(ConstantExpr::getGetElementPtr(Ty, PC, IdxList, NW)); in FoldGEP()
161 return Fold(ConstantExpr::getExtractElement(CVec, CIdx)); in FoldExtractElement()
171 return Fold(ConstantExpr::getInsertElement(CVec, CNewElt, CIdx)); in FoldInsertElement()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DConstantHoisting.h56 class ConstantExpr; variable
88 ConstantExpr *ConstExpr;
91 ConstantCandidate(ConstantInt *ConstInt, ConstantExpr *ConstExpr=nullptr) :
120 ConstantExpr *BaseExpr;
148 using ConstPtrUnionType = PointerUnion<ConstantInt *, ConstantExpr *>;
188 ConstantExpr *ConstExpr);
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSanitizerStats.cpp52 ConstantExpr::getIntToPtr( in create()
61 auto InitAddr = ConstantExpr::getGetElementPtr( in create()
H A DRelLookupTableConverter.cpp114 Constant *Base = llvm::ConstantExpr::getPtrToInt(RelLookupTable, IntPtrTy); in createRelLookupTable()
115 Constant *Target = llvm::ConstantExpr::getPtrToInt(Element, IntPtrTy); in createRelLookupTable()
116 Constant *Sub = llvm::ConstantExpr::getSub(Target, Base); in createRelLookupTable()
118 llvm::ConstantExpr::getTrunc(Sub, Type::getInt32Ty(M.getContext())); in createRelLookupTable()
H A DEvaluator.cpp81 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
190 MV->Val = ConstantExpr::getIntToPtr(V, MVType); in write()
192 MV->Val = ConstantExpr::getPtrToInt(V, MVType); in write()
194 MV->Val = ConstantExpr::getBitCast(V, MVType); in write()
504 InstResult = ConstantExpr::getBitCast(InstResult, II->getType()); in EvaluateBlock()
/freebsd/contrib/llvm-project/llvm/lib/Target/XCore/
H A DXCoreLowerThreadLocal.cpp78 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { in replaceConstantExprOp()
102 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); in replaceConstantExprOp()
120 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU); in rewriteNonInstructionUses()
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXGenericToNVVM.cpp46 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
123 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType()); in runOnModule()
165 } else if (isa<ConstantExpr>(C)) { in remapConstant()
169 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder); in remapConstant()
215 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C, in remapConstantExpr()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DInferAddressSpaces.cpp455 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in appendsFlatAddressExpressionToPostorderStack()
470 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) { in appendsFlatAddressExpressionToPostorderStack()
570 return ConstantExpr::getAddrSpaceCast(C, NewPtrTy); in operandWithNewAddressSpaceOrCreatePoison()
706 ConstantExpr *CE, unsigned NewAddrSpace, in cloneConstantExprWithNewAddressSpace()
720 return ConstantExpr::getBitCast(CE->getOperand(0), TargetType); in cloneConstantExprWithNewAddressSpace()
725 return ConstantExpr::getBitCast(cast<Constant>(NewOperand), TargetType); in cloneConstantExprWithNewAddressSpace()
726 return ConstantExpr::getAddrSpaceCast(CE, TargetType); in cloneConstantExprWithNewAddressSpace()
731 Constant *Src = cast<ConstantExpr>(CE->getOperand(0))->getOperand(0); in cloneConstantExprWithNewAddressSpace()
733 return ConstantExpr::getBitCast(Src, TargetType); in cloneConstantExprWithNewAddressSpace()
751 if (auto *CExpr = dyn_cast<ConstantExpr>(Operand)) in cloneConstantExprWithNewAddressSpace()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DConstantFolding.cpp92 return ConstantExpr::getBitCast(C, DestTy); in foldConstVectorToAPInt()
125 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
144 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
155 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
161 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
185 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
195 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
227 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
260 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
270 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
[all …]
H A DTypeMetadataUtils.cpp184 if (auto *C = dyn_cast<ConstantExpr>(I)) { in getPointerAtOffset()
195 auto *CE = dyn_cast<ConstantExpr>(C); in getPointerAtOffset()
239 auto *PtrExpr = dyn_cast<ConstantExpr>(U); in replaceRelativePointerUserWithZero()
244 auto *SubExpr = dyn_cast<ConstantExpr>(PtrToIntUser); in replaceRelativePointerUserWithZero()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DConstantInitBuilder.cpp98 llvm::ConstantExpr::getInBoundsGetElementPtr( in resolveSelfReferences()
141 base = llvm::ConstantExpr::getPtrToInt(base, Builder.CGM.IntPtrTy); in getRelativeOffsetToPosition()
142 target = llvm::ConstantExpr::getPtrToInt(target, Builder.CGM.IntPtrTy); in getRelativeOffsetToPosition()
143 llvm::Constant *offset = llvm::ConstantExpr::getSub(target, base); in getRelativeOffsetToPosition()
147 offset = llvm::ConstantExpr::getTrunc(offset, offsetType); in getRelativeOffsetToPosition()
/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/
H A DSPIRVRegularizer.cpp82 auto *CE = cast<ConstantExpr>(V); in runLowerConstExpr()
111 return isa<ConstantExpr>(V) || isa<Function>(V); in runLowerConstExpr()
143 } else if (auto CE = dyn_cast<ConstantExpr>(Op)) { in runLowerConstExpr()
153 if (auto *CE = dyn_cast<ConstantExpr>(C)) in runLowerConstExpr()
/freebsd/contrib/llvm-project/llvm/lib/Frontend/Offloading/
H A DOffloadWrapper.cpp157 ConstantExpr::getGetElementPtr(Image->getValueType(), Image, ZeroBegin); in createBinDesc()
159 ConstantExpr::getGetElementPtr(Image->getValueType(), Image, ZeroSize); in createBinDesc()
176 ConstantExpr::getGetElementPtr(Images->getValueType(), Images, ZeroZero); in createBinDesc()
289 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Fatbin, Int8PtrTy), in createFatbinDesc()
495 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
500 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
563 ConstantExpr::getPointerBitCastOrAddrSpaceCast(FatbinDesc, PtrTy)); in createRegisterFatbinFunction()
H A DUtility.cpp54 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Addr, Int8PtrTy), in getOffloadingEntryInitializer()
55 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Str, Int8PtrTy), in getOffloadingEntryInitializer()
/freebsd/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/
H A DIRDynamicChecks.cpp247 return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)}; in BuildPointerValidatorFunc()
271 return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)}; in BuildObjectCheckerFunc()
432 if (llvm::ConstantExpr *const_expr = in GetFunction()
433 llvm::dyn_cast<llvm::ConstantExpr>(value)) { in GetFunction()
H A DIRForTarget.cpp471 CFSCWB_ty, ConstantExpr::getIntToPtr(CFSCWB_addr_int, CFSCWB_ptr_ty)}; in RewriteObjCConstString()
822 ConstantExpr::getIntToPtr(srN_addr_int, srN_ptr_ty)}; in RewriteObjCSelector()
981 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) { in MaybeHandleVariable()
1090 ConstantExpr::getIntToPtr(symbol_addr_int, symbol_type); in HandleSymbol()
1163 ConstantExpr::getIntToPtr(class_addr, load_instruction->getType()); in HandleObjCClass()
1328 if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(constant)) { in UnfoldConstant()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineNegator.cpp143 return ConstantExpr::getNeg(cast<Constant>(V), in visitImpl()
218 Constant *NegTrueC = ConstantExpr::getNeg(TrueC); in visitImpl()
219 Constant *NegFalseC = ConstantExpr::getNeg(FalseC); in visitImpl()
285 Builder.CreateSDiv(I->getOperand(0), ConstantExpr::getNeg(Op1C), in visitImpl()
464 Value *Xor = Builder.CreateXor(Ops[0], ConstantExpr::getNot(C)); in visitImpl()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DHWAddressSanitizer.cpp566 return ConstantExpr::getTrunc( in createHwasanCtorComdat()
567 ConstantExpr::getSub(ConstantExpr::getPtrToInt(Ptr, Int64Ty), in createHwasanCtorComdat()
568 ConstantExpr::getPtrToInt(Note, Int64Ty)), in createHwasanCtorComdat()
760 IRB, ConstantExpr::getIntToPtr( in getShadowNonTls()
1718 auto *GVRelPtr = ConstantExpr::getTrunc( in instrumentGlobal()
1719 ConstantExpr::getAdd( in instrumentGlobal()
1720 ConstantExpr::getSub( in instrumentGlobal()
1721 ConstantExpr::getPtrToInt(NewGV, Int64Ty), in instrumentGlobal()
1722 ConstantExpr::getPtrToInt(Descriptor, Int64Ty)), in instrumentGlobal()
1735 Constant *Aliasee = ConstantExpr::getIntToPtr( in instrumentGlobal()
[all …]

12345678910