| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | Constants.h | 1024 static Constant *getAnd(Constant *C1, Constant *C2); 1025 static Constant *getOr(Constant *C1, Constant *C2); 1026 static Constant *getXor(Constant *C1, Constant *C2); 1027 static Constant *getUMin(Constant *C1, Constant *C2); 1055 static Constant *getNSWAdd(Constant *C1, Constant *C2) { 1059 static Constant *getNUWAdd(Constant *C1, Constant *C2) { 1063 static Constant *getNSWSub(Constant *C1, Constant *C2) { 1067 static Constant *getNUWSub(Constant *C1, Constant *C2) { 1071 static Constant *getNSWMul(Constant *C1, Constant *C2) { 1190 static Constant *getSelect(Constant *C, Constant *V1, Constant *V2, [all …]
|
| H A D | ConstantFold.h | 30 class Constant; variable 39 Constant *ConstantFoldSelectInstruction(Constant *Cond, 40 Constant *V1, Constant *V2); 41 Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx); 42 Constant *ConstantFoldInsertElementInstruction(Constant *Val, Constant *Elt, 44 Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, 46 Constant *ConstantFoldExtractValueInstruction(Constant *Agg, 48 Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, 50 Constant *ConstantFoldUnaryInstruction(unsigned Opcode, Constant *V); 51 Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1, [all …]
|
| H A D | ConstantFolder.h | 93 if (Constant *C = dyn_cast<Constant>(V)) in FoldUnOpFMF() 177 Constant *CreateCast(Instruction::CastOps Op, Constant *C, in CreateCast() 182 Constant *CreatePointerCast(Constant *C, Type *DestTy) const override { in CreatePointerCast() 186 Constant *CreatePointerBitCastOrAddrSpaceCast(Constant *C, in CreatePointerBitCastOrAddrSpaceCast() 191 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() 196 Constant *CreateFPCast(Constant *C, Type *DestTy) const override { in CreateFPCast() 200 Constant *CreateBitCast(Constant *C, Type *DestTy) const override { in CreateBitCast() 204 Constant *CreateIntToPtr(Constant *C, Type *DestTy) const override { in CreateIntToPtr() 208 Constant *CreatePtrToInt(Constant *C, Type *DestTy) const override { in CreatePtrToInt() 212 Constant *CreateZExtOrBitCast(Constant *C, Type *DestTy) const override { in CreateZExtOrBitCast() [all …]
|
| H A D | Constant.h | 41 class Constant : public User { 46 ~Constant() = default; 49 void operator=(const Constant &) = delete; 50 Constant(const Constant &) = delete; 142 Constant *getAggregateElement(Constant *Elt) const; 180 static Constant *getNullValue(Type* Ty); 185 static Constant *getAllOnesValue(Type* Ty); 213 Constant *stripPointerCasts() { in stripPointerCasts() 214 return const_cast<Constant*>( in stripPointerCasts() 220 static Constant *replaceUndefsWith(Constant *C, Constant *Replacement); [all …]
|
| H A D | IRBuilderFolder.h | 77 virtual Value *CreateCast(Instruction::CastOps Op, Constant *C, 79 virtual Value *CreatePointerCast(Constant *C, Type *DestTy) const = 0; 80 virtual Value *CreatePointerBitCastOrAddrSpaceCast(Constant *C, 82 virtual Value *CreateIntCast(Constant *C, Type *DestTy, 84 virtual Value *CreateFPCast(Constant *C, Type *DestTy) const = 0; 85 virtual Value *CreateBitCast(Constant *C, Type *DestTy) const = 0; 86 virtual Value *CreateIntToPtr(Constant *C, Type *DestTy) const = 0; 87 virtual Value *CreatePtrToInt(Constant *C, Type *DestTy) const = 0; 88 virtual Value *CreateZExtOrBitCast(Constant *C, Type *DestTy) const = 0; 96 virtual Value *CreateFCmp(CmpInst::Predicate P, Constant *LHS, [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | ConstantFolding.h | 28 class Constant; variable 81 Constant *ConstantFoldUnaryOpOperand(unsigned Opcode, Constant *Op, 102 Constant *FlushFPConstant(Constant *Operand, const Instruction *I, 108 Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1, 119 Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, 125 Constant *ConstantFoldExtractValueInstruction(Constant *Agg, 131 Constant *ConstantFoldInsertElementInstruction(Constant *Val, 138 Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx); 144 Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, 154 Constant *ConstantFoldLoadFromConst(Constant *C, Type *Ty, [all …]
|
| H A D | TargetFolder.h | 29 class Constant; variable 38 Constant *Fold(Constant *C) const { in Fold() 112 if (Constant *C = dyn_cast<Constant>(V)) in FoldUnOpFMF() 188 Constant *CreateCast(Instruction::CastOps Op, Constant *C, in CreateCast() 194 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() 205 Constant *CreateFPCast(Constant *C, Type *DestTy) const override { in CreateFPCast() 210 Constant *CreateBitCast(Constant *C, Type *DestTy) const override { in CreateBitCast() 213 Constant *CreateIntToPtr(Constant *C, Type *DestTy) const override { in CreateIntToPtr() 216 Constant *CreatePtrToInt(Constant *C, Type *DestTy) const override { in CreatePtrToInt() 235 Constant *CreatePointerBitCastOrAddrSpaceCast(Constant *C, in CreatePointerBitCastOrAddrSpaceCast() [all …]
|
| /llvm-project-15.0.7/mlir/test/Target/SPIRV/ |
| H A D | constant.mlir | 6 // CHECK: spv.Constant true 7 %0 = spv.Constant true 8 // CHECK: spv.Constant false 9 %1 = spv.Constant false 19 %0 = spv.Constant 0 : i32 21 %1 = spv.Constant 10 : i32 23 %2 = spv.Constant -5 : i32 33 %0 = spv.Constant 0 : si32 35 %1 = spv.Constant 10 : si32 37 %2 = spv.Constant -5 : si32 [all …]
|
| H A D | phi.mlir | 8 %zero = spv.Constant 0 : i32 29 %zero = spv.Constant 0 : i32 31 %one = spv.Constant 1.0 : f32 53 %zero = spv.Constant 0 : i32 118 %true = spv.Constant true 165 %3 = spv.Constant 12 : i32 166 %4 = spv.Constant 32 : i32 167 %5 = spv.Constant 4 : i32 295 %true = spv.Constant true 314 %true = spv.Constant true [all …]
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | ConstantEmitter.h | 72 llvm::Constant *tryEmitForInitializer(const VarDecl &D); 102 llvm::Constant *emitAbstract(const Expr *E, QualType T); 107 llvm::Constant *tryEmitAbstract(const Expr *E, QualType T); 115 llvm::Constant *emitNullForMemory(QualType T) { in emitNullForMemory() 118 llvm::Constant *emitForMemory(llvm::Constant *C, QualType T) { in emitForMemory() 123 static llvm::Constant *emitForMemory(CodeGenModule &CGM, llvm::Constant *C, 130 llvm::Constant *tryEmitPrivateForVarInit(const VarDecl &D); 132 llvm::Constant *tryEmitPrivate(const Expr *E, QualType T); 152 void registerCurrentAddrPrivate(llvm::Constant *signal, 161 llvm::Constant *markIfFailed(llvm::Constant *init) { in markIfFailed() [all …]
|
| H A D | CGExprConstant.cpp | 1374 llvm::Constant * 1381 llvm::Constant * 1388 llvm::Constant * 1409 llvm::Constant * 1422 llvm::Constant * 1684 llvm::Constant * 1691 llvm::Constant * 1833 llvm::Constant *applyOffset(llvm::Constant *C) { in applyOffset() 1890 llvm::Constant * 2220 llvm::Constant * [all …]
|
| H A D | CodeGenModule.h | 42 class Constant; variable 251 llvm::Constant *CopyHelper; 252 llvm::Constant *DisposeHelper; 291 llvm::Constant *Initializer; 292 llvm::Constant *AssociatedData; 485 llvm::Constant *> 670 llvm::Constant * 682 Address createUnnamedGlobalFrom(const VarDecl &D, llvm::Constant *Constant, 971 llvm::Constant * 1058 llvm::Constant * [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/ |
| H A D | Evaluator.h | 49 MutableValue(Constant *C) { Val = C; } in MutableValue() 58 if (auto *C = Val.dyn_cast<Constant *>()) in getType() 63 Constant *toConstant() const { in toConstant() 64 if (auto *C = Val.dyn_cast<Constant *>()) in toConstant() 78 Constant *toConstant() const; 117 Constant *getVal(Value *V) { in getVal() 118 if (Constant *CV = dyn_cast<Constant>(V)) return CV; in getVal() 124 void setVal(Value *V, Constant *C) { in setVal() 129 Constant *castCallResultIfNeeded(Type *ReturnType, Constant *RV); 140 Constant *ComputeLoadResult(Constant *P, Type *Ty); [all …]
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Constants.cpp | 439 Constant *Constant::getAggregateElement(Constant *Elt) const { in getAggregateElement() 747 Constant *Constant::replaceUndefsWith(Constant *C, Constant *Replacement) { in replaceUndefsWith() 771 Constant *Constant::mergeUndefsWith(Constant *C, Constant *Other) { in mergeUndefsWith() 2442 Constant *ConstantExpr::getSelect(Constant *C, Constant *V1, Constant *V2, in getSelect() 2664 Constant *ConstantExpr::getAdd(Constant *C1, Constant *C2, in getAdd() 2671 Constant *ConstantExpr::getSub(Constant *C1, Constant *C2, in getSub() 2678 Constant *ConstantExpr::getMul(Constant *C1, Constant *C2, in getMul() 2685 Constant *ConstantExpr::getAnd(Constant *C1, Constant *C2) { in getAnd() 2689 Constant *ConstantExpr::getOr(Constant *C1, Constant *C2) { in getOr() 2693 Constant *ConstantExpr::getXor(Constant *C1, Constant *C2) { in getXor() [all …]
|
| H A D | ConstantFold.cpp | 43 static Constant *BitCastConstantVector(Constant *CV, VectorType *DstTy) { in BitCastConstantVector() 70 Constant *C = in BitCastConstantVector() 109 static Constant *FoldBitCast(Constant *V, Type *DestTy) { in FoldBitCast() 521 Constant *llvm::ConstantFoldSelectInstruction(Constant *Cond, in ConstantFoldSelectInstruction() 533 Constant *V; in ConstantFoldSelectInstruction() 716 Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, in ConstantFoldShuffleVectorInstruction() 787 Constant *llvm::ConstantFoldInsertValueInstruction(Constant *Agg, in ConstantFoldInsertValueInstruction() 1966 Constant *Idx0 = cast<Constant>(Idxs[0]); in foldGEPOfGEP() 2054 Constant *IdxC = cast<Constant>(Idx); in ConstantFoldGetElementPtr() 2111 Constant *Idx0 = cast<Constant>(Idxs[0]); in ConstantFoldGetElementPtr() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | ConstantsTest.cpp | 31 Constant *Poison = PoisonValue::get(Int1); in TEST() 123 Constant *Zero128 = Constant::getNullValue(Int128Ty); in TEST() 142 Constant::getNullValue(Int64Ty), in TEST() 181 Constant *NullInt32Ptr0 = Constant::getNullValue(Int32PtrTy); in TEST() 182 Constant *NullInt32Ptr1 = Constant::getNullValue(Int32Ptr1Ty); in TEST() 214 Constant *Global = in TEST() 216 Constant *Global2 = in TEST() 281 std::vector<Constant *> V; in TEST() 314 Constant *Global = in TEST() 759 Constant *Zero = Constant::getNullValue(Ty); in TEST() [all …]
|
| /llvm-project-15.0.7/mlir/test/Dialect/SPIRV/Transforms/ |
| H A D | canonicalize.mlir | 12 %c0 = spv.Constant 0: i32 29 %c0 = spv.Constant 0: i32 49 %c1 = spv.Constant 1: i32 141 // spv.Constant 148 %0 = spv.Constant 42 : i32 149 %1 = spv.Constant 42 : i32 310 // CHECK: spv.Constant 0 373 %true = spv.Constant true 488 %0 = spv.Constant 0: i32 490 %1 = spv.Constant 1: i32 [all …]
|
| /llvm-project-15.0.7/flang/include/flang/Evaluate/ |
| H A D | constant.h | 40 template <typename> class Constant; variable 71 Constant<SubscriptInteger> SHAPE() const; 135 CLASS_BOILERPLATE(Constant) in CLASS_BOILERPLATE() argument 160 CLASS_BOILERPLATE(Constant) 162 explicit Constant(Scalar<Result> &&); 163 Constant( 165 ~Constant(); 209 class Constant<SomeDerived> 216 Constant(const StructureConstructor &); 217 Constant(StructureConstructor &&); [all …]
|
| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | constant.cpp | 178 auto Constant<T>::Reshape(ConstantSubscripts &&dims) const -> Constant { in Reshape() 183 std::size_t Constant<T>::CopyFrom(const Constant<T> &source, std::size_t count, in CopyFrom() 190 Constant<Type<TypeCategory::Character, KIND>>::Constant( in Constant() function in Fortran::evaluate::Constant::Character 195 Constant<Type<TypeCategory::Character, KIND>>::Constant(Scalar<Result> &&str) in Constant() function in Fortran::evaluate::Constant::Character 200 Constant<Type<TypeCategory::Character, KIND>>::Constant(ConstantSubscript len, in Constant() function in Fortran::evaluate::Constant::Character 220 Constant<Type<TypeCategory::Character, KIND>>::~Constant() {} in ~Constant() 312 Constant<SomeDerived>::Constant(const StructureConstructor &x) in Constant() function in Fortran::evaluate::Constant 315 Constant<SomeDerived>::Constant(StructureConstructor &&x) in Constant() function in Fortran::evaluate::Constant 318 Constant<SomeDerived>::Constant(const semantics::DerivedTypeSpec &spec, in Constant() function in Fortran::evaluate::Constant 331 Constant<SomeDerived>::Constant(const semantics::DerivedTypeSpec &spec, in Constant() function in Fortran::evaluate::Constant [all …]
|
| /llvm-project-15.0.7/mlir/test/Conversion/MemRefToSPIRV/ |
| H A D | memref-to-spirv.mlir | 21 // CHECK: [[ZERO1:%.*]] = spv.Constant 0 : i32 27 // CHECK: [[ZERO2:%.*]] = spv.Constant 0 : i32 73 // CHECK: %[[ZERO_0:.+]] = spv.Constant 0 : i32 74 // CHECK: %[[ZERO_1:.+]] = spv.Constant 0 : i32 75 // CHECK: %[[ONE:.+]] = spv.Constant 1 : i32 80 // CHECK: %[[ONE_I8:.+]] = spv.Constant 1 : i8 94 // CHECK: %[[ZERO_0:.+]] = spv.Constant 0 : i32 95 // CHECK: %[[ZERO_1:.+]] = spv.Constant 0 : i32 96 // CHECK: %[[ONE:.+]] = spv.Constant 1 : i32 100 // CHECK: %[[ZERO_I8:.+]] = spv.Constant 0 : i8 [all …]
|
| /llvm-project-15.0.7/mlir/test/Conversion/SPIRVToLLVM/ |
| H A D | constant-op-to-llvm.mlir | 4 // spv.Constant 10 %0 = spv.Constant true 12 %1 = spv.Constant false 21 %1 = spv.Constant dense<false> : vector<3xi1> 28 %0 = spv.Constant 0 : i8 30 %1 = spv.Constant -5 : si64 32 %2 = spv.Constant 10 : ui16 39 %0 = spv.Constant dense<[2, 3]> : vector<2xi32> 41 %1 = spv.Constant dense<-4> : vector<2xsi32> 50 %0 = spv.Constant 5.000000e+00 : f16 [all …]
|
| /llvm-project-15.0.7/clang/test/SemaTemplate/ |
| H A D | instantiation-default-2.cpp | 3 template<typename T, T Value> struct Constant; // expected-note{{template parameter is declared her… 6 Constant<int, 5> *c1; 11 Constant<int&, x> *c2; 12 Constant<int*, &x> *c3; 13 Constant<float (*)(int, double), f> *c4; 14 Constant<float (*)(int, double), &f> *c5; 16 Constant<float (*)(int, int), f> *c6; // expected-error{{non-type template argument of type 'float … 18 Constant<float, 0> *c7; // expected-note{{while substituting}}
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | Evaluator.cpp | 45 isSimpleEnoughValueToCommit(Constant *C, 58 isSimpleEnoughValueToCommitHelper(Constant *C, in isSimpleEnoughValueToCommitHelper() 113 isSimpleEnoughValueToCommit(Constant *C, in isSimpleEnoughValueToCommit() 147 Constant *C = Val.get<Constant *>(); in makeMutable() 201 SmallVector<Constant *, 32> Consts; in toConstant() 215 Constant *Evaluator::ComputeLoadResult(Constant *P, Type *Ty) { in ComputeLoadResult() 236 static Function *getFunction(Constant *C) { in getFunction() 281 Constant *Evaluator::castCallResultIfNeeded(Type *ReturnType, Constant *RV) { in castCallResultIfNeeded() 299 Constant *InstResult = nullptr; in EvaluateBlock() 528 Constant *RetVal = nullptr; in EvaluateBlock() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | ConstantFolding.cpp | 211 Constant *Zero = Constant::getNullValue(DstEltTy); in FoldBitCast() 648 Constant *Init = const_cast<Constant *>(GV->getInitializer()); in ReadByteArrayFromGlobal() 672 Constant *getConstantAtOffset(Constant *Base, APInt Offset, in getConstantAtOffset() 779 Constant *SymbolicallyEvaluateBinop(unsigned Opc, Constant *Op0, Constant *Op1, in SymbolicallyEvaluateBinop() 862 Constant *StripPtrCastKeepAS(Constant *Ptr) { in StripPtrCastKeepAS() 1121 Constant * 1130 Constant *OldC = cast<Constant>(&OldU); in ConstantFoldConstantImpl() 1165 SmallDenseMap<Constant *, Constant *> FoldedOps; in ConstantFoldInstruction() 1195 SmallDenseMap<Constant *, Constant *> FoldedOps; in ConstantFoldInstruction() 1209 SmallDenseMap<Constant *, Constant *> FoldedOps; in ConstantFoldConstant() [all …]
|
| /llvm-project-15.0.7/mlir/test/Dialect/SPIRV/IR/ |
| H A D | asm-op-interface.mlir | 5 %0 = spv.Constant true 7 %1 = spv.Constant false 10 %2 = spv.Constant 42 : i32 12 %-2 = spv.Constant -42 : i32 14 %3 = spv.Constant 43 : i64 17 %4 = spv.Constant 0.5 : f32 19 %5 = spv.Constant 0.5 : f64 22 %6 = spv.Constant dense<[1, 2, 3]> : vector<3xi32> 25 %8 = spv.Constant [dense<3.0> : vector<2xf32>] : !spv.array<1xvector<2xf32>>
|