Home
last modified time | relevance | path

Searched refs:ConstantValue (Results 1 – 13 of 13) sorted by relevance

/llvm-project-15.0.7/mlir/include/mlir/Analysis/DataFlow/
H A DConstantPropagationAnalysis.h29 class ConstantValue {
32 ConstantValue(Attribute knownValue = {}, Dialect *dialect = nullptr)
42 bool operator==(const ConstantValue &rhs) const {
50 static ConstantValue getPessimisticValueState(Value value) { return {}; } in getPessimisticValueState()
54 static ConstantValue join(const ConstantValue &lhs, in join()
55 const ConstantValue &rhs) { in join()
56 return lhs == rhs ? lhs : ConstantValue(); in join()
75 : public SparseDataFlowAnalysis<Lattice<ConstantValue>> {
80 ArrayRef<const Lattice<ConstantValue> *> operands,
81 ArrayRef<Lattice<ConstantValue> *> results) override;
/llvm-project-15.0.7/mlir/lib/Analysis/DataFlow/
H A DConstantPropagationAnalysis.cpp22 void ConstantValue::print(raw_ostream &os) const { in print()
33 Operation *op, ArrayRef<const Lattice<ConstantValue> *> operands, in visitOperation()
34 ArrayRef<Lattice<ConstantValue> *> results) { in visitOperation()
77 Lattice<ConstantValue> *lattice = std::get<0>(it); in visitOperation()
84 lattice->join(ConstantValue(attr, op->getDialect()))); in visitOperation()
H A DDeadCodeAnalysis.cpp314 function_ref<const Lattice<ConstantValue> *(Value)> getLattice) { in getOperandValuesImpl()
318 const Lattice<ConstantValue> *cv = getLattice(operand); in getOperandValuesImpl()
330 auto *lattice = getOrCreate<Lattice<ConstantValue>>(value); in getOperandValues()
H A DIntegerRangeAnalysis.cpp42 auto *cv = solver->getOrCreateState<Lattice<ConstantValue>>(value); in onUpdate()
52 cv, cv->join(ConstantValue(IntegerAttr::get(value.getType(), *constant), in onUpdate()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DUnrollLoopsCheck.cpp209 int ConstantValue; in hasLargeNumIterations() local
210 if (!extractValue(ConstantValue, Op, Context)) in hasLargeNumIterations()
214 Iterations = ceil(float(EndValue - InitValue) / ConstantValue); in hasLargeNumIterations()
217 Iterations = ceil(float(InitValue - EndValue) / ConstantValue); in hasLargeNumIterations()
220 Iterations = 1 + (log(EndValue) - log(InitValue)) / log(ConstantValue); in hasLargeNumIterations()
223 Iterations = 1 + (log(InitValue) - log(EndValue)) / log(ConstantValue); in hasLargeNumIterations()
/llvm-project-15.0.7/mlir/test/lib/Analysis/DataFlow/
H A DTestDeadCodeAnalysis.cpp82 auto *constant = getOrCreate<Lattice<ConstantValue>>(op->getResult(0)); in visit()
84 constant, constant->join(ConstantValue(value, op->getDialect()))); in visit()
97 auto *constantValue = getOrCreate<Lattice<ConstantValue>>(value); in markAllPessimisticFixpoint()
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Scalar/
H A DGVNExpression.h590 Constant *ConstantValue = nullptr;
595 : Expression(ET_Constant), ConstantValue(constantValue) {} in ConstantExpression()
603 Constant *getConstantValue() const { return ConstantValue; } in getConstantValue()
604 void setConstantValue(Constant *V) { ConstantValue = V; } in setConstantValue()
608 return ConstantValue == OC.ConstantValue; in equals()
613 ConstantValue->getType(), ConstantValue); in getHashValue()
621 OS << " constant = " << *ConstantValue; in printInternal()
/llvm-project-15.0.7/mlir/lib/Transforms/
H A DSCCP.cpp40 auto *lattice = solver.lookupState<Lattice<ConstantValue>>(value); in replaceWithConstant()
43 const ConstantValue &latticeValue = lattice->getValue(); in replaceWithConstant()
/llvm-project-15.0.7/llvm/lib/IR/
H A DInstructions.cpp154 Value *ConstantValue = getIncomingValue(0); in hasConstantValue() local
156 if (getIncomingValue(i) != ConstantValue && getIncomingValue(i) != this) { in hasConstantValue()
157 if (ConstantValue != this) in hasConstantValue()
160 ConstantValue = getIncomingValue(i); in hasConstantValue()
162 if (ConstantValue == this) in hasConstantValue()
164 return ConstantValue; in hasConstantValue()
173 Value *ConstantValue = nullptr; in hasConstantOrUndefValue() local
177 if (ConstantValue && ConstantValue != Incoming) in hasConstantOrUndefValue()
179 ConstantValue = Incoming; in hasConstantOrUndefValue()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DOverload.h364 APValue &ConstantValue, QualType &ConstantType,
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaOverload.cpp311 ASTContext &Ctx, const Expr *Converted, APValue &ConstantValue, in getNarrowingKind() argument
370 ConstantValue = APValue(*IntConstantValue); in getNarrowingKind()
395 if (Initializer->isCXX11ConstantExpr(Ctx, &ConstantValue)) { in getNarrowingKind()
397 assert(ConstantValue.isFloat()); in getNarrowingKind()
398 llvm::APFloat FloatVal = ConstantValue.getFloat(); in getNarrowingKind()
469 ConstantValue = APValue(InitializerValue); in getNarrowingKind()
H A DSemaInit.cpp9877 APValue ConstantValue; in DiagnoseNarrowingInInitList() local
9879 switch (SCS->getNarrowingKind(S.Context, PostInit, ConstantValue, in DiagnoseNarrowingInInitList()
9905 << ConstantValue.getAsString(S.getASTContext(), ConstantType) in DiagnoseNarrowingInInitList()
/llvm-project-15.0.7/llvm/lib/Target/AArch64/
H A DAArch64ISelLowering.cpp11202 SDValue ConstantValue; in LowerBUILD_VECTOR() local
11218 if (!ConstantValue.getNode()) in LowerBUILD_VECTOR()
11219 ConstantValue = V; in LowerBUILD_VECTOR()
11220 else if (ConstantValue != V) in LowerBUILD_VECTOR()
11370 SDValue Vec = DAG.getSplatBuildVector(VT, dl, ConstantValue), in LowerBUILD_VECTOR()
11374 Val = DAG.getNode(AArch64ISD::DUP, dl, VT, ConstantValue); in LowerBUILD_VECTOR()