Home
last modified time | relevance | path

Searched refs:constOp (Results 1 – 15 of 15) sorted by relevance

/external/llvm-project/mlir/lib/Transforms/Utils/
DFoldUtils.cpp58 if (auto *constOp = dialect->materializeConstant(builder, value, type, loc)) { in materializeConstant() local
60 assert(matchPattern(constOp, m_Constant())); in materializeConstant()
61 return constOp; in materializeConstant()
159 Operation *constOp = tryGetOrCreateConstant(uniquedConstants, dialect, in getOrCreateConstant() local
161 return constOp ? constOp->getResult(0) : Value(); in getOrCreateConstant()
219 if (auto *constOp = in tryToFold() local
222 results.push_back(constOp->getResult(0)); in tryToFold()
DLoopUtils.cpp167 auto constOp = topBuilder.create<ConstantIndexOp>( in promoteIfSingleIteration() local
169 iv.replaceAllUsesWith(constOp); in promoteIfSingleIteration()
/external/llvm-project/mlir/lib/Dialect/SPIRV/
DSPIRVOps.cpp81 auto constOp = dyn_cast_or_null<spirv::ConstantOp>(op); in extractValueFromConstOp() local
82 if (!constOp) { in extractValueFromConstOp()
85 auto valueAttr = constOp.value(); in extractValueFromConstOp()
1488 static void print(spirv::ConstantOp constOp, OpAsmPrinter &printer) { in print() argument
1489 printer << spirv::ConstantOp::getOperationName() << ' ' << constOp.value(); in print()
1490 if (constOp.getType().isa<spirv::ArrayType>()) in print()
1491 printer << " : " << constOp.getType(); in print()
1494 static LogicalResult verify(spirv::ConstantOp constOp) { in verify() argument
1495 auto opType = constOp.getType(); in verify()
1496 auto value = constOp.value(); in verify()
[all …]
/external/llvm-project/mlir/lib/Conversion/StandardToSPIRV/
DConvertStandardToSPIRV.cpp393 matchAndRewrite(ConstantOp constOp, ArrayRef<Value> operands,
403 matchAndRewrite(ConstantOp constOp, ArrayRef<Value> operands,
585 ConstantOp constOp, ArrayRef<Value> operands, in matchAndRewrite() argument
587 auto srcType = constOp.getType().dyn_cast<ShapedType>(); in matchAndRewrite()
598 auto dstElementsAttr = constOp.value().dyn_cast<DenseElementsAttr>(); in matchAndRewrite()
661 rewriter.replaceOpWithNewOp<spirv::ConstantOp>(constOp, dstType, in matchAndRewrite()
671 ConstantOp constOp, ArrayRef<Value> operands, in matchAndRewrite() argument
673 Type srcType = constOp.getType(); in matchAndRewrite()
683 auto srcAttr = constOp.value().cast<FloatAttr>(); in matchAndRewrite()
694 rewriter.replaceOpWithNewOp<spirv::ConstantOp>(constOp, dstType, dstAttr); in matchAndRewrite()
[all …]
/external/llvm-project/mlir/lib/IR/
DBuilders.cpp442 auto *constOp = dialect->materializeConstant( in tryFold() local
444 if (!constOp) { in tryFold()
450 assert(matchPattern(constOp, m_Constant())); in tryFold()
452 generatedConstants.push_back(constOp); in tryFold()
453 results.push_back(constOp->getResult(0)); in tryFold()
/external/llvm-project/mlir/tools/mlir-tblgen/
DOpFormatGen.h23 void generateOpFormat(const Operator &constOp, OpClass &opClass);
DOpFormatGen.cpp2965 void mlir::tblgen::generateOpFormat(const Operator &constOp, OpClass &opClass) { in generateOpFormat() argument
2968 Operator &op = const_cast<Operator &>(constOp); in generateOpFormat()
/external/llvm-project/mlir/lib/Conversion/SCFToGPU/
DSCFToGPU.cpp400 if (ConstantOp constOp = val.getDefiningOp<ConstantOp>()) in processParallelLoop() local
401 return rewriter.create<ConstantOp>(constOp.getLoc(), constOp.getValue()); in processParallelLoop()
/external/llvm-project/mlir/lib/Conversion/SPIRVToLLVM/
DConvertSPIRVToLLVM.cpp393 matchAndRewrite(spirv::ConstantOp constOp, ArrayRef<Value> operands, in matchAndRewrite() argument
395 auto srcType = constOp.getType(); in matchAndRewrite()
414 auto dstElementsAttr = constOp.value().cast<DenseIntElementsAttr>(); in matchAndRewrite()
416 constOp, dstType, in matchAndRewrite()
421 auto srcAttr = constOp.value().cast<IntegerAttr>(); in matchAndRewrite()
423 rewriter.replaceOpWithNewOp<LLVM::ConstantOp>(constOp, dstType, dstAttr); in matchAndRewrite()
426 rewriter.replaceOpWithNewOp<LLVM::ConstantOp>(constOp, dstType, operands, in matchAndRewrite()
427 constOp.getAttrs()); in matchAndRewrite()
/external/llvm-project/mlir/lib/Analysis/
DUtils.cpp310 if (auto constOp = dyn_cast<ConstantIndexOp>(op)) { in compute() local
311 cst.setIdToConstant(symbol, constOp.getValue()); in compute()
DAffineStructures.cpp652 if (auto constOp = id.getDefiningOp<ConstantIndexOp>()) in addInductionVarOrTerminalSymbol() local
653 setIdToConstant(id, constOp.getValue()); in addInductionVarOrTerminalSymbol()
/external/llvm-project/mlir/lib/Dialect/SPIRV/Serialization/
DDeserializer.cpp2344 if (auto constOp = getSpecConstant(id)) { in getValue() local
2346 unknownLoc, constOp.default_value().getType(), in getValue()
2347 opBuilder.getSymbolRefAttr(constOp.getOperation())); in getValue()
/external/llvm/lib/Transforms/Instrumentation/
DMemorySanitizer.cpp1794 Constant *constOp; in handleSignedRelationalComparison() local
1797 if ((constOp = dyn_cast<Constant>(I.getOperand(1)))) { in handleSignedRelationalComparison()
1800 } else if ((constOp = dyn_cast<Constant>(I.getOperand(0)))) { in handleSignedRelationalComparison()
1808 if ((constOp->isNullValue() && in handleSignedRelationalComparison()
1810 (constOp->isAllOnesValue() && in handleSignedRelationalComparison()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Instrumentation/
DMemorySanitizer.cpp2312 Constant *constOp; in handleSignedRelationalComparison() local
2315 if ((constOp = dyn_cast<Constant>(I.getOperand(1)))) { in handleSignedRelationalComparison()
2318 } else if ((constOp = dyn_cast<Constant>(I.getOperand(0)))) { in handleSignedRelationalComparison()
2326 if ((constOp->isNullValue() && in handleSignedRelationalComparison()
2328 (constOp->isAllOnesValue() && in handleSignedRelationalComparison()
/external/llvm-project/llvm/lib/Transforms/Instrumentation/
DMemorySanitizer.cpp2439 Constant *constOp; in handleSignedRelationalComparison() local
2442 if ((constOp = dyn_cast<Constant>(I.getOperand(1)))) { in handleSignedRelationalComparison()
2445 } else if ((constOp = dyn_cast<Constant>(I.getOperand(0)))) { in handleSignedRelationalComparison()
2453 if ((constOp->isNullValue() && in handleSignedRelationalComparison()
2455 (constOp->isAllOnesValue() && in handleSignedRelationalComparison()