Lines Matching refs:varOp
1048 auto varOp = dyn_cast_or_null<spirv::GlobalVariableOp>( in verify() local
1051 if (!varOp) { in verify()
1054 if (addressOfOp.pointer().getType() != varOp.type()) { in verify()
1971 static void print(spirv::GlobalVariableOp varOp, OpAsmPrinter &printer) { in print() argument
1972 auto *op = varOp.getOperation(); in print()
1979 printer.printSymbolName(varOp.sym_name()); in print()
1983 if (auto initializer = varOp.initializer()) { in print()
1992 printer << " : " << varOp.type(); in print()
1995 static LogicalResult verify(spirv::GlobalVariableOp varOp) { in verify() argument
2000 auto storageClass = varOp.storageClass(); in verify()
2003 return varOp.emitOpError("storage class cannot be '") in verify()
2008 varOp->getAttrOfType<FlatSymbolRefAttr>(kInitializerAttrName)) { in verify()
2010 varOp->getParentOp(), init.getValue()); in verify()
2016 return varOp.emitOpError("initializer must be result of a " in verify()
2930 static void print(spirv::VariableOp varOp, OpAsmPrinter &printer) { in print() argument
2936 if (varOp.getNumOperands() != 0) in print()
2937 printer << " init(" << varOp.initializer() << ")"; in print()
2939 printVariableDecorations(varOp, printer, elidedAttrs); in print()
2940 printer << " : " << varOp.getType(); in print()
2943 static LogicalResult verify(spirv::VariableOp varOp) { in verify() argument
2947 if (varOp.storage_class() != spirv::StorageClass::Function) { in verify()
2948 return varOp.emitOpError( in verify()
2953 auto pointerType = varOp.pointer().getType().cast<spirv::PointerType>(); in verify()
2954 if (varOp.storage_class() != pointerType.getStorageClass()) in verify()
2955 return varOp.emitOpError( in verify()
2958 if (varOp.getNumOperands() != 0) { in verify()
2961 auto *initOp = varOp.getOperand(0).getDefiningOp(); in verify()
2965 return varOp.emitOpError("initializer must be the result of a " in verify()
2970 auto *op = varOp.getOperation(); in verify()
2980 return varOp.emitOpError("cannot have '") in verify()