Home
last modified time | relevance | path

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

12345678910

/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantFolder.h49 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldBinOp()
50 return ConstantExpr::get(Opc, LC, RC); in FoldBinOp()
61 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldExactBinOp()
62 return ConstantExpr::get(Opc, LC, RC, in FoldExactBinOp()
74 if (ConstantExpr::isDesirableBinOp(Opc)) { in FoldNoWrapBinOp()
80 return ConstantExpr::get(Opc, LC, RC, Flags); in FoldNoWrapBinOp()
109 if (!ConstantExpr::isSupportedGetElementPtr(Ty)) in FoldGEP()
117 return ConstantExpr::getGetElementPtr(Ty, PC, IdxList, NW); in FoldGEP()
151 return ConstantExpr::getExtractElement(CVec, CIdx); in FoldExtractElement()
161 return ConstantExpr::getInsertElement(CVec, CNewElt, CIdx); in FoldInsertElement()
[all …]
H A DOperator.h46 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
54 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
60 static bool classof(const ConstantExpr *) { return true; } in classof() argument
62 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
88 friend class ConstantExpr; variable
136 static bool classof(const ConstantExpr *CE) { in classof()
142 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
162 friend class ConstantExpr;
390 static bool classof(const ConstantExpr *CE) {
395 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantsContext.h46 class CastConstantExpr final : public ConstantExpr {
51 : ConstantExpr(Ty, Opcode, AllocMarker) { in CastConstantExpr()
61 static bool classof(const ConstantExpr *CE) { in classof()
65 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
71 class BinaryConstantExpr final : public ConstantExpr {
77 : ConstantExpr(C1->getType(), Opcode, AllocMarker) { in BinaryConstantExpr()
90 static bool classof(const ConstantExpr *CE) { in classof()
94 return isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)); in classof()
101 class ExtractElementConstantExpr final : public ConstantExpr {
106 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
[all …]
H A DConstantFold.cpp46 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
83 return ConstantExpr::getBitCast(ConstantVector::get(V), DestTy); in FoldBitCast()
102 return ConstantExpr::getBitCast(ConstantVector::get(V), DestTy); in FoldBitCast()
126 return ConstantExpr::isDesirableCastOp(opc) in foldMaybeUndesirableCast()
127 ? ConstantExpr::getCast(opc, V, DestTy) in foldMaybeUndesirableCast()
152 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction()
183 Constant *C = ConstantExpr::getExtractElement(V, ConstantInt::get(Ty, i)); in ConstantFoldCastInstruction()
275 Constant *V1Element = ConstantExpr::getExtractElement(V1, in ConstantFoldSelectInstruction()
277 Constant *V2Element = ConstantExpr::getExtractElement(V2, in ConstantFoldSelectInstruction()
321 if (isa<ConstantExpr>(C)) in ConstantFoldSelectInstruction()
[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()
366 if (isa<ConstantExpr>(getAggregateElement(i))) in containsConstantExpression()
411 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
666 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) { in getRelocationInfo()
668 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in getRelocationInfo()
669 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in getRelocationInfo()
848 if (isa<ConstantAggregate>(this) || isa<ConstantExpr>(this)) { in isManifestConstant()
1519 V = ConstantExpr::getInsertElement(PoisonV, V, ConstantInt::get(IdxTy, 0)); in getSplat()
1523 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/Analysis/
H A DTargetFolder.h60 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldBinOp()
61 return Fold(ConstantExpr::get(Opc, LC, RC)); in FoldBinOp()
72 if (ConstantExpr::isDesirableBinOp(Opc)) in FoldExactBinOp()
73 return Fold(ConstantExpr::get( in FoldExactBinOp()
85 if (ConstantExpr::isDesirableBinOp(Opc)) { in FoldNoWrapBinOp()
91 return Fold(ConstantExpr::get(Opc, LC, RC, Flags)); in FoldNoWrapBinOp()
120 if (!ConstantExpr::isSupportedGetElementPtr(Ty)) in FoldGEP()
127 return Fold(ConstantExpr::getGetElementPtr(Ty, PC, IdxList, NW)); in FoldGEP()
162 return Fold(ConstantExpr::getExtractElement(CVec, CIdx)); in FoldExtractElement()
172 return Fold(ConstantExpr::getInsertElement(CVec, CNewElt, CIdx)); in FoldInsertElement()
[all …]
/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.cpp135 Constant *Base = llvm::ConstantExpr::getPtrToInt(RelLookupTable, IntPtrTy); in createRelLookupTable()
136 Constant *Target = llvm::ConstantExpr::getPtrToInt(Element, IntPtrTy); in createRelLookupTable()
137 Constant *Sub = llvm::ConstantExpr::getSub(Target, Base); in createRelLookupTable()
139 llvm::ConstantExpr::getTrunc(Sub, Type::getInt32Ty(M.getContext())); in createRelLookupTable()
H A DEvaluator.cpp80 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
191 MV->Val = ConstantExpr::getIntToPtr(V, MVType); in write()
193 MV->Val = ConstantExpr::getPtrToInt(V, MVType); in write()
195 MV->Val = ConstantExpr::getBitCast(V, MVType); in write()
475 InstResult = ConstantExpr::getBitCast(InstResult, II->getType()); in EvaluateBlock()
/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/Target/XCore/
H A DXCoreLowerThreadLocal.cpp75 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/contrib/llvm-project/llvm/lib/CodeGen/
H A DWindowsSecureHotPatching.cpp365 ConstantExpr::getGetElementPtr(PtrTy, GV, ArrayRef<Value *>{}); in getOrCreateRefVariable()
433 Instruction *NewInst = cast<ConstantExpr>(C)->getAsInstruction(); in rewriteGlobalVariablesInConstant()
528 ConstantExpr *CE = cast<ConstantExpr>(V); in runOnFunction()
598 ConstantExpr *CE = cast<ConstantExpr>(OperandValue); in runOnFunction()
/freebsd/contrib/llvm-project/llvm/include/llvm/SandboxIR/
H A DOperator.h26 static bool classof(const ConstantExpr *) { return true; } in classof() argument
50 static bool classof(const ConstantExpr *From) { in classof()
52 cast<llvm::ConstantExpr>(From->Val)); in classof()
/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()
164 } else if (isa<ConstantExpr>(C)) { in remapConstant()
168 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder); in remapConstant()
214 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C, in remapConstantExpr()
/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/Transforms/Scalar/
H A DInferAddressSpaces.cpp518 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in appendsFlatAddressExpressionToPostorderStack()
533 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(O)) in appendsFlatAddressExpressionToPostorderStack()
631 return ConstantExpr::getAddrSpaceCast(C, NewPtrTy); in operandWithNewAddressSpaceOrCreatePoison()
765 ConstantExpr *CE, unsigned NewAddrSpace, in cloneConstantExprWithNewAddressSpace()
784 return ConstantExpr::getBitCast(cast<Constant>(NewOperand), TargetType); in cloneConstantExprWithNewAddressSpace()
785 return ConstantExpr::getAddrSpaceCast(CE, TargetType); in cloneConstantExprWithNewAddressSpace()
790 Constant *Src = cast<ConstantExpr>(CE->getOperand(0))->getOperand(0); in cloneConstantExprWithNewAddressSpace()
810 if (auto *CExpr = dyn_cast<ConstantExpr>(Operand)) in cloneConstantExprWithNewAddressSpace()
876 cast<ConstantExpr>(V), NewAddrSpace, ValueWithNewAddrSpace, DL, TTI); in cloneValueWithNewAddressSpace()
1274 Cmp->setOperand(OtherIdx, ConstantExpr::getAddrSpaceCast( in performPointerReplacement()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/
H A DSPIRVRegularizer.cpp75 auto *CE = cast<ConstantExpr>(V); in runLowerConstExpr()
104 return isa<ConstantExpr>(V) || isa<Function>(V); in runLowerConstExpr()
137 } else if (auto CE = dyn_cast<ConstantExpr>(Op)) { in runLowerConstExpr()
147 if (auto *CE = dyn_cast<ConstantExpr>(C)) in runLowerConstExpr()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DTypeMetadataUtils.cpp189 if (auto *C = dyn_cast<ConstantExpr>(I)) { in getPointerAtOffset()
200 auto *CE = dyn_cast<ConstantExpr>(C); in getPointerAtOffset()
244 auto *PtrExpr = dyn_cast<ConstantExpr>(U); in replaceRelativePointerUserWithZero()
249 auto *SubExpr = dyn_cast<ConstantExpr>(PtrToIntUser); in replaceRelativePointerUserWithZero()
H A DConstantFolding.cpp99 return ConstantExpr::getBitCast(C, DestTy); in foldConstVectorToAPInt()
132 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
151 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
164 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
169 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
175 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
199 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
209 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
240 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
273 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/
H A DDXILPrepare.cpp175 if (ConstantExpr *GEPInstr = dyn_cast<ConstantExpr>(Operand)) { in maybeGenerateBitcast()
178 if (ConstantExpr *NewGEPInstr = dyn_cast<ConstantExpr>(OpArg)) { in maybeGenerateBitcast()
H A DDXILFlattenArrays.cpp157 ConstantExpr *CE = dyn_cast<ConstantExpr>(CurrOpperand); in visitLoadInst()
180 ConstantExpr *CE = dyn_cast<ConstantExpr>(CurrOpperand); in visitStoreInst()
229 if (auto *PtrOpGEPCE = dyn_cast<ConstantExpr>(PtrOperand); in visitGetElementPtrInst()
/freebsd/contrib/llvm-project/llvm/lib/Frontend/Offloading/
H A DUtility.cpp71 ConstantExpr::getNullValue(Int64Ty), in getOffloadingEntryInitializer()
75 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Addr, PtrTy), in getOffloadingEntryInitializer()
76 ConstantExpr::getPointerBitCastOrAddrSpaceCast(Str, PtrTy), in getOffloadingEntryInitializer()
79 AuxAddr ? ConstantExpr::getPointerBitCastOrAddrSpaceCast(AuxAddr, PtrTy) in getOffloadingEntryInitializer()
80 : ConstantExpr::getNullValue(PtrTy)}; in getOffloadingEntryInitializer()
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()
529 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
534 ConstantExpr::getInBoundsGetElementPtr( in createRegisterGlobalsFunction()
597 ConstantExpr::getPointerBitCastOrAddrSpaceCast(FatbinDesc, PtrTy)); in createRegisterFatbinFunction()

12345678910