• Home
  • Raw
  • Download

Lines Matching refs:constOp

81   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()
1504 return constOp.emitOpError("result type (") in verify()
1514 return constOp.emitOpError( in verify()
1525 return constOp.emitOpError("only support nested array result type"); in verify()
1529 return constOp.emitOpError("result element type (") in verify()
1535 return constOp.emitOpError("result number of elements (") in verify()
1544 return constOp.emitOpError( in verify()
1549 return constOp.emitOpError("has array element whose type (") in verify()
1556 return constOp.emitOpError("cannot have value of type ") << valueType; in verify()
2792 static void print(spirv::SpecConstantOp constOp, OpAsmPrinter &printer) { in print() argument
2794 printer.printSymbolName(constOp.sym_name()); in print()
2795 if (auto specID = constOp->getAttrOfType<IntegerAttr>(kSpecIdAttrName)) in print()
2797 printer << " = " << constOp.default_value(); in print()
2800 static LogicalResult verify(spirv::SpecConstantOp constOp) { in verify() argument
2801 if (auto specID = constOp->getAttrOfType<IntegerAttr>(kSpecIdAttrName)) in verify()
2803 return constOp.emitOpError("SpecId cannot be negative"); in verify()
2805 auto value = constOp.default_value(); in verify()
2809 return constOp.emitOpError("default value bitwidth disallowed"); in verify()
2812 return constOp.emitOpError( in verify()
3365 static LogicalResult verify(spirv::SpecConstantCompositeOp constOp) { in verify() argument
3366 auto cType = constOp.type().dyn_cast<spirv::CompositeType>(); in verify()
3367 auto constituents = constOp.constituents().getValue(); in verify()
3370 return constOp.emitError( in verify()
3372 << constOp.type(); in verify()
3375 return constOp.emitError("unsupported composite type ") << cType; in verify()
3377 return constOp.emitError("has incorrect number of operands: expected ") in verify()
3386 constOp->getParentOp(), constituent.getValue())); in verify()
3390 return constOp.emitError("has incorrect types of operands: expected ") in verify()
3430 static LogicalResult verify(spirv::SpecConstantOperationOp constOp) { in verify() argument
3431 Block &block = constOp.getRegion().getBlocks().front(); in verify()
3434 return constOp.emitOpError("expected exactly 2 nested ops"); in verify()
3439 return constOp.emitOpError("expected terminator to be a yield op"); in verify()
3458 return constOp.emitOpError("invalid enclosed op"); in verify()
3460 if (enclosedOp.getNumOperands() != constOp.getOperands().size()) in verify()
3461 return constOp.emitOpError("invalid number of operands; expected ") in verify()
3463 << constOp.getOperands().size(); in verify()
3465 if (enclosedOp.getNumOperands() != constOp.getRegion().getNumArguments()) in verify()
3466 return constOp.emitOpError("invalid number of region arguments; expected ") in verify()
3468 << constOp.getRegion().getNumArguments(); in verify()
3470 for (auto operand : constOp.getOperands()) in verify()
3474 return constOp.emitOpError("invalid operand"); in verify()