Home
last modified time | relevance | path

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

123456789

/freebsd-14.2/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()
102 return ConstantExpr::getCompare(P, LC, RC); in FoldICmp()
108 if (!ConstantExpr::isSupportedGetElementPtr(Ty))
179 if (ConstantExpr::isDesirableCastOp(Op)) in FoldCast()
191 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast()
[all …]
H A DOperator.h44 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
52 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
85 friend class ConstantExpr; variable
123 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
137 friend class ConstantExpr; variable
164 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
346 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
373 friend class ConstantExpr; variable
512 friend class ConstantExpr; variable
540 friend class ConstantExpr; variable
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/IR/
H A DConstantsContext.h48 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in CastConstantExpr()
58 static bool classof(const ConstantExpr *CE) { in classof()
62 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
85 static bool classof(const ConstantExpr *CE) { in classof()
89 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
116 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
144 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
154 : ConstantExpr(VectorType::get( in ShuffleVectorConstantExpr()
180 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
213 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
[all …]
H A DConstantFold.cpp153 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
211 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction()
822 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
866 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
1019 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
1028 if (!isa<ConstantExpr>(T) || cast<ConstantExpr>(T)->getOpcode() != Opcode) in ConstantFoldBinaryInstruction()
1160 ConstantExpr *CE1 = cast<ConstantExpr>(V1); in evaluateICmpRelation()
1263 return ConstantExpr::getXor(C1, ConstantExpr::getNot(C2)); in ConstantFoldCompareInstruction()
1264 return ConstantExpr::getXor(ConstantExpr::getNot(C1), C2); in ConstantFoldCompareInstruction()
1408 if ((!isa<ConstantExpr>(C1) && isa<ConstantExpr>(C2)) || in ConstantFoldCompareInstruction()
[all …]
H A DConstants.cpp394 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
634 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) { in getRelocationInfo()
636 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in getRelocationInfo()
637 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in getRelocationInfo()
1430 bool ConstantExpr::isCast() const { in isCast()
1434 bool ConstantExpr::isCompare() const { in isCompare()
1438 unsigned ConstantExpr::getPredicate() const { in getPredicate()
1456 return const_cast<ConstantExpr*>(this); in getWithOperands()
1485 return ConstantExpr::getGetElementPtr( in getWithOperands()
1678 if (isa<ConstantExpr>(this)) in getUniqueInteger()
[all …]
H A DReplaceConstant.cpp22 return isa<ConstantExpr>(U) || isa<ConstantAggregate>(U); in isExpandableUser()
28 if (auto *CE = dyn_cast<ConstantExpr>(C)) { in expandUser()
H A DAbstractCallSite.cpp65 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U->getUser())) in AbstractCallSite()
H A DCore.cpp1618 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf()
1622 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf()
1643 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd()
1700 return wrap(ConstantExpr::getICmp(Predicate, in LLVMConstICmp()
1707 return wrap(ConstantExpr::getFCmp(Predicate, in LLVMConstFCmp()
2781 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetICmpPredicate()
2790 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(unwrap(Inst))) in LLVMGetFCmpPredicate()
3585 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); in LLVMBuildMalloc()
3586 AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, ITy); in LLVMBuildMalloc()
3594 Constant* AllocSize = ConstantExpr::getSizeOf(unwrap(Ty)); in LLVMBuildArrayMalloc()
[all …]
/freebsd-14.2/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()
106 return Fold(ConstantExpr::getCompare(P, LC, RC)); in FoldICmp()
119 if (!ConstantExpr::isSupportedGetElementPtr(Ty))
164 return Fold(ConstantExpr::getExtractElement(CVec, CIdx)); in FoldExtractElement()
201 return Fold(ConstantExpr::getPointerCast(C, DestTy)); in CreatePointerCast()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DConstantHoisting.h55 class ConstantExpr; variable
86 ConstantExpr *ConstExpr;
89 ConstantCandidate(ConstantInt *ConstInt, ConstantExpr *ConstExpr=nullptr) :
118 ConstantExpr *BaseExpr;
146 using ConstPtrUnionType = PointerUnion<ConstantInt *, ConstantExpr *>;
185 ConstantExpr *ConstExpr);
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/XCore/
H A DXCoreLowerThreadLocal.cpp78 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { in replaceConstantExprOp()
99 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); in replaceConstantExprOp()
117 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU); in rewriteNonInstructionUses()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/
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 DSanitizerStats.cpp52 ConstantExpr::getIntToPtr( in create()
61 auto InitAddr = ConstantExpr::getGetElementPtr( in create()
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()
H A DGlobalStatus.cpp73 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in analyzeGlobalAux()
/freebsd-14.2/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-14.2/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()
705 ConstantExpr *CE, unsigned NewAddrSpace, in cloneConstantExprWithNewAddressSpace()
719 return ConstantExpr::getBitCast(CE->getOperand(0), TargetType); in cloneConstantExprWithNewAddressSpace()
725 return ConstantExpr::getAddrSpaceCast(CE, TargetType); in cloneConstantExprWithNewAddressSpace()
730 Constant *Src = cast<ConstantExpr>(CE->getOperand(0))->getOperand(0); in cloneConstantExprWithNewAddressSpace()
732 return ConstantExpr::getBitCast(Src, TargetType); in cloneConstantExprWithNewAddressSpace()
750 if (auto *CExpr = dyn_cast<ConstantExpr>(Operand)) in cloneConstantExprWithNewAddressSpace()
1283 Cmp->setOperand(OtherIdx, ConstantExpr::getAddrSpaceCast( in rewriteWithNewAddressSpaces()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DTypeMetadataUtils.cpp170 if (auto *C = dyn_cast<ConstantExpr>(I)) { in getPointerAtOffset()
181 auto *CE = dyn_cast<ConstantExpr>(C); in getPointerAtOffset()
206 auto *PtrExpr = dyn_cast<ConstantExpr>(U); in replaceRelativePointerUsersWithZero()
211 auto *SubExpr = dyn_cast<ConstantExpr>(PtrToIntUser); in replaceRelativePointerUsersWithZero()
H A DConstantFolding.cpp144 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()
314 auto *CE = dyn_cast<ConstantExpr>(C); in IsConstantOffsetFromGlobal()
534 if (auto *CE = dyn_cast<ConstantExpr>(C)) { in ReadDataFromGlobal()
1072 return ConstantExpr::getShuffleVector( in ConstantFoldInstOperandsImpl()
1271 return ConstantExpr::getCompare( in ConstantFoldCompareInstOperands()
1276 } else if (isa<ConstantExpr>(Ops1)) { in ConstantFoldCompareInstOperands()
[all …]
/freebsd-14.2/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-14.2/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-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineNegator.cpp143 return ConstantExpr::getNeg(cast<Constant>(V), /*HasNUW=*/false, in visitImpl()
218 Constant *NegTrueC = ConstantExpr::getNeg(TrueC); in visitImpl()
219 Constant *NegFalseC = ConstantExpr::getNeg(FalseC); in visitImpl()
280 Builder.CreateSDiv(I->getOperand(0), ConstantExpr::getNeg(Op1C), in visitImpl()
398 ConstantExpr::getShl(Constant::getAllOnesValue(Op1C->getType()), Op1C), in visitImpl()
447 Value *Xor = Builder.CreateXor(Ops[0], ConstantExpr::getNot(C)); in visitImpl()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Frontend/Offloading/
H A DOffloadWrapper.cpp155 ConstantExpr::getGetElementPtr(Image->getValueType(), Image, ZeroBegin); in createBinDesc()
157 ConstantExpr::getGetElementPtr(Image->getValueType(), Image, ZeroSize); in createBinDesc()
174 ConstantExpr::getGetElementPtr(Images->getValueType(), Images, ZeroZero); in createBinDesc()
281 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Fatbin, Int8PtrTy), in createFatbinDesc()
487 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
492 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
555 ConstantExpr::getPointerBitCastOrAddrSpaceCast(FatbinDesc, PtrTy)); in createRegisterFatbinFunction()
H A DUtility.cpp49 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Addr, Int8PtrTy), in getOffloadingEntryInitializer()
50 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Str, Int8PtrTy), in getOffloadingEntryInitializer()
/freebsd-14.2/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()

123456789