[Mlir-commits] [mlir] e13d23b - [mlir] Rename `OpAsmParser::OperandType` to `OpAsmParser::UnresolvedOperand`

Markus Böck llvmlistbot at llvm.org
Mon Mar 21 13:42:37 PDT 2022


Author: Markus Böck
Date: 2022-03-21T21:42:13+01:00
New Revision: e13d23bc6ccd3ae4fad5824282a09b48822c177f

URL: https://github.com/llvm/llvm-project/commit/e13d23bc6ccd3ae4fad5824282a09b48822c177f
DIFF: https://github.com/llvm/llvm-project/commit/e13d23bc6ccd3ae4fad5824282a09b48822c177f.diff

LOG: [mlir] Rename `OpAsmParser::OperandType` to `OpAsmParser::UnresolvedOperand`

I am not sure about the meaning of Type in the name (was it meant be interpreted as Kind?), and given the importance and meaning of Type in the context of MLIR, its probably better to rename it. Given the comment in the source code, the suggestion in the GitHub issue and the final discussions in the review, this patch renames the OperandType to UnresolvedOperand.

Fixes https://github.com/llvm/llvm-project/issues/54446

Differential Revision: https://reviews.llvm.org/D122142

Added: 
    

Modified: 
    flang/include/flang/Optimizer/Dialect/FIROps.h
    flang/lib/Optimizer/Dialect/FIROps.cpp
    mlir/docs/OpDefinitions.md
    mlir/docs/Tutorials/Toy/Ch-2.md
    mlir/examples/toy/Ch2/mlir/Dialect.cpp
    mlir/examples/toy/Ch3/mlir/Dialect.cpp
    mlir/examples/toy/Ch4/mlir/Dialect.cpp
    mlir/examples/toy/Ch5/mlir/Dialect.cpp
    mlir/examples/toy/Ch6/mlir/Dialect.cpp
    mlir/examples/toy/Ch7/mlir/Dialect.cpp
    mlir/include/mlir/IR/FunctionImplementation.h
    mlir/include/mlir/IR/OpImplementation.h
    mlir/include/mlir/Interfaces/ViewLikeInterface.h
    mlir/lib/Dialect/Affine/IR/AffineOps.cpp
    mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
    mlir/lib/Dialect/Async/IR/Async.cpp
    mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
    mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
    mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    mlir/lib/Dialect/PDL/IR/PDL.cpp
    mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
    mlir/lib/Dialect/SCF/SCF.cpp
    mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
    mlir/lib/Dialect/Shape/IR/Shape.cpp
    mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    mlir/lib/IR/FunctionImplementation.cpp
    mlir/lib/Interfaces/ViewLikeInterface.cpp
    mlir/lib/Parser/Parser.cpp
    mlir/test/lib/Dialect/Test/TestDialect.cpp
    mlir/tools/mlir-tblgen/OpFormatGen.cpp

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Optimizer/Dialect/FIROps.h b/flang/include/flang/Optimizer/Dialect/FIROps.h
index 8858976e9f41f..68202a182889b 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.h
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.h
@@ -33,7 +33,7 @@ mlir::ParseResult parseCmpcOp(mlir::OpAsmParser &parser,
                               mlir::OperationState &result);
 mlir::ParseResult parseSelector(mlir::OpAsmParser &parser,
                                 mlir::OperationState &result,
-                                mlir::OpAsmParser::OperandType &selector,
+                                mlir::OpAsmParser::UnresolvedOperand &selector,
                                 mlir::Type &type);
 
 static constexpr llvm::StringRef getAdaptToByRefAttrName() {

diff  --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp
index 4d36ec4a5a6f1..159b0beb28f6e 100644
--- a/flang/lib/Optimizer/Dialect/FIROps.cpp
+++ b/flang/lib/Optimizer/Dialect/FIROps.cpp
@@ -94,7 +94,7 @@ static mlir::ParseResult parseAllocatableOp(FN wrapResultType,
     return mlir::failure();
   auto &builder = parser.getBuilder();
   result.addAttribute("in_type", mlir::TypeAttr::get(intype));
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> operands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> operands;
   llvm::SmallVector<mlir::Type> typeVec;
   bool hasOperands = false;
   std::int32_t typeparamsSize = 0;
@@ -627,7 +627,7 @@ void fir::CallOp::print(mlir::OpAsmPrinter &p) {
 
 mlir::ParseResult fir::CallOp::parse(mlir::OpAsmParser &parser,
                                      mlir::OperationState &result) {
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> operands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> operands;
   if (parser.parseOperandList(operands))
     return mlir::failure();
 
@@ -654,7 +654,8 @@ mlir::ParseResult fir::CallOp::parse(mlir::OpAsmParser &parser,
       return mlir::failure();
   } else {
     auto funcArgs =
-        llvm::ArrayRef<mlir::OpAsmParser::OperandType>(operands).drop_front();
+        llvm::ArrayRef<mlir::OpAsmParser::UnresolvedOperand>(operands)
+            .drop_front();
     if (parser.resolveOperand(operands[0], funcType, result.operands) ||
         parser.resolveOperands(funcArgs, funcType.getInputs(),
                                parser.getNameLoc(), result.operands))
@@ -707,7 +708,7 @@ static void printCmpOp(OpAsmPrinter &p, OPTY op) {
 template <typename OPTY>
 static mlir::ParseResult parseCmpOp(mlir::OpAsmParser &parser,
                                     mlir::OperationState &result) {
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> ops;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> ops;
   mlir::NamedAttrList attrs;
   mlir::Attribute predicateNameAttr;
   mlir::Type type;
@@ -895,13 +896,13 @@ void CoordinateOp::print(mlir::OpAsmPrinter &p) {
 
 mlir::ParseResult CoordinateOp::parse(mlir::OpAsmParser &parser,
                                       mlir::OperationState &result) {
-  mlir::OpAsmParser::OperandType memref;
+  mlir::OpAsmParser::UnresolvedOperand memref;
   if (parser.parseOperand(memref) || parser.parseComma())
     return mlir::failure();
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> coorOperands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> coorOperands;
   if (parser.parseOperandList(coorOperands))
     return mlir::failure();
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> allOperands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> allOperands;
   allOperands.push_back(memref);
   allOperands.append(coorOperands.begin(), coorOperands.end());
   mlir::FunctionType funcTy;
@@ -955,7 +956,7 @@ mlir::FunctionType fir::DispatchOp::getFunctionType() {
 mlir::ParseResult DispatchOp::parse(mlir::OpAsmParser &parser,
                                     mlir::OperationState &result) {
   mlir::FunctionType calleeType;
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> operands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> operands;
   auto calleeLoc = parser.getNameLoc();
   llvm::StringRef calleeName;
   if (failed(parser.parseOptionalKeyword(&calleeName))) {
@@ -1100,7 +1101,7 @@ mlir::ParseResult EmboxProcOp::parse(mlir::OpAsmParser &parser,
   if (parser.parseAttribute(procRef, "funcname", result.attributes))
     return mlir::failure();
   bool hasTuple = false;
-  mlir::OpAsmParser::OperandType tupleRef;
+  mlir::OpAsmParser::UnresolvedOperand tupleRef;
   if (!parser.parseOptionalComma()) {
     if (parser.parseOperand(tupleRef))
       return mlir::failure();
@@ -1376,7 +1377,7 @@ mlir::ParseResult FieldIndexOp::parse(mlir::OpAsmParser &parser,
   result.addAttribute(fir::FieldIndexOp::typeAttrName(),
                       mlir::TypeAttr::get(recty));
   if (!parser.parseOptionalLParen()) {
-    llvm::SmallVector<mlir::OpAsmParser::OperandType> operands;
+    llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> operands;
     llvm::SmallVector<mlir::Type> types;
     auto loc = parser.getNameLoc();
     if (parser.parseOperandList(operands, mlir::OpAsmParser::Delimiter::None) ||
@@ -1591,7 +1592,7 @@ void fir::IterWhileOp::build(mlir::OpBuilder &builder,
 mlir::ParseResult IterWhileOp::parse(mlir::OpAsmParser &parser,
                                      mlir::OperationState &result) {
   auto &builder = parser.getBuilder();
-  mlir::OpAsmParser::OperandType inductionVariable, lb, ub, step;
+  mlir::OpAsmParser::UnresolvedOperand inductionVariable, lb, ub, step;
   if (parser.parseLParen() || parser.parseRegionArgument(inductionVariable) ||
       parser.parseEqual())
     return mlir::failure();
@@ -1608,7 +1609,7 @@ mlir::ParseResult IterWhileOp::parse(mlir::OpAsmParser &parser,
       parser.resolveOperand(step, indexType, result.operands))
     return mlir::failure();
 
-  mlir::OpAsmParser::OperandType iterateVar, iterateInput;
+  mlir::OpAsmParser::UnresolvedOperand iterateVar, iterateInput;
   if (parser.parseKeyword("and") || parser.parseLParen() ||
       parser.parseRegionArgument(iterateVar) || parser.parseEqual() ||
       parser.parseOperand(iterateInput) || parser.parseRParen() ||
@@ -1616,7 +1617,7 @@ mlir::ParseResult IterWhileOp::parse(mlir::OpAsmParser &parser,
     return mlir::failure();
 
   // Parse the initial iteration arguments.
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> regionArgs;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> regionArgs;
   auto prependCount = false;
 
   // Induction variable.
@@ -1624,7 +1625,7 @@ mlir::ParseResult IterWhileOp::parse(mlir::OpAsmParser &parser,
   regionArgs.push_back(iterateVar);
 
   if (succeeded(parser.parseOptionalKeyword("iter_args"))) {
-    llvm::SmallVector<mlir::OpAsmParser::OperandType> operands;
+    llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> operands;
     llvm::SmallVector<mlir::Type> regionTypes;
     // Parse assignment list and results type list.
     if (parser.parseAssignmentList(regionArgs, operands) ||
@@ -1860,7 +1861,7 @@ mlir::ParseResult fir::LoadOp::getElementOf(mlir::Type &ele, mlir::Type ref) {
 mlir::ParseResult LoadOp::parse(mlir::OpAsmParser &parser,
                                 mlir::OperationState &result) {
   mlir::Type type;
-  mlir::OpAsmParser::OperandType oper;
+  mlir::OpAsmParser::UnresolvedOperand oper;
   if (parser.parseOperand(oper) ||
       parser.parseOptionalAttrDict(result.attributes) ||
       parser.parseColonType(type) ||
@@ -1915,7 +1916,7 @@ void fir::DoLoopOp::build(mlir::OpBuilder &builder,
 mlir::ParseResult DoLoopOp::parse(mlir::OpAsmParser &parser,
                                   mlir::OperationState &result) {
   auto &builder = parser.getBuilder();
-  mlir::OpAsmParser::OperandType inductionVariable, lb, ub, step;
+  mlir::OpAsmParser::UnresolvedOperand inductionVariable, lb, ub, step;
   // Parse the induction variable followed by '='.
   if (parser.parseRegionArgument(inductionVariable) || parser.parseEqual())
     return mlir::failure();
@@ -1934,7 +1935,7 @@ mlir::ParseResult DoLoopOp::parse(mlir::OpAsmParser &parser,
     result.addAttribute("unordered", builder.getUnitAttr());
 
   // Parse the optional initial iteration arguments.
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> regionArgs, operands;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> regionArgs, operands;
   llvm::SmallVector<mlir::Type> argTypes;
   auto prependCount = false;
   regionArgs.push_back(inductionVariable);
@@ -2346,7 +2347,7 @@ static LogicalResult verifyIntegralSwitchTerminator(OpT op) {
 static mlir::ParseResult parseIntegralSwitchTerminator(
     mlir::OpAsmParser &parser, mlir::OperationState &result,
     llvm::StringRef casesAttr, llvm::StringRef operandSegmentAttr) {
-  mlir::OpAsmParser::OperandType selector;
+  mlir::OpAsmParser::UnresolvedOperand selector;
   mlir::Type type;
   if (parseSelector(parser, result, selector, type))
     return mlir::failure();
@@ -2556,13 +2557,13 @@ fir::SelectCaseOp::getSuccessorOperands(mlir::ValueRange operands,
 // parser for fir.select_case Op
 mlir::ParseResult SelectCaseOp::parse(mlir::OpAsmParser &parser,
                                       mlir::OperationState &result) {
-  mlir::OpAsmParser::OperandType selector;
+  mlir::OpAsmParser::UnresolvedOperand selector;
   mlir::Type type;
   if (parseSelector(parser, result, selector, type))
     return mlir::failure();
 
   llvm::SmallVector<mlir::Attribute> attrs;
-  llvm::SmallVector<mlir::OpAsmParser::OperandType> opers;
+  llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> opers;
   llvm::SmallVector<mlir::Block *> dests;
   llvm::SmallVector<llvm::SmallVector<mlir::Value>> destArgs;
   llvm::SmallVector<int32_t> argOffs;
@@ -2579,8 +2580,8 @@ mlir::ParseResult SelectCaseOp::parse(mlir::OpAsmParser &parser,
     if (attr.dyn_cast_or_null<mlir::UnitAttr>()) {
       argOffs.push_back(0);
     } else if (attr.dyn_cast_or_null<fir::ClosedIntervalAttr>()) {
-      mlir::OpAsmParser::OperandType oper1;
-      mlir::OpAsmParser::OperandType oper2;
+      mlir::OpAsmParser::UnresolvedOperand oper1;
+      mlir::OpAsmParser::UnresolvedOperand oper2;
       if (parser.parseOperand(oper1) || parser.parseComma() ||
           parser.parseOperand(oper2) || parser.parseComma())
         return mlir::failure();
@@ -2589,7 +2590,7 @@ mlir::ParseResult SelectCaseOp::parse(mlir::OpAsmParser &parser,
       argOffs.push_back(2);
       offSize += 2;
     } else {
-      mlir::OpAsmParser::OperandType oper;
+      mlir::OpAsmParser::UnresolvedOperand oper;
       if (parser.parseOperand(oper) || parser.parseComma())
         return mlir::failure();
       opers.push_back(oper);
@@ -2861,7 +2862,7 @@ fir::SelectTypeOp::getSuccessorOperands(llvm::ArrayRef<mlir::Value> operands,
 }
 
 ParseResult SelectTypeOp::parse(OpAsmParser &parser, OperationState &result) {
-  mlir::OpAsmParser::OperandType selector;
+  mlir::OpAsmParser::UnresolvedOperand selector;
   mlir::Type type;
   if (parseSelector(parser, result, selector, type))
     return mlir::failure();
@@ -3075,8 +3076,8 @@ mlir::Type fir::StoreOp::elementType(mlir::Type refType) {
 mlir::ParseResult StoreOp::parse(mlir::OpAsmParser &parser,
                                  mlir::OperationState &result) {
   mlir::Type type;
-  mlir::OpAsmParser::OperandType oper;
-  mlir::OpAsmParser::OperandType store;
+  mlir::OpAsmParser::UnresolvedOperand oper;
+  mlir::OpAsmParser::UnresolvedOperand store;
   if (parser.parseOperand(oper) || parser.parseKeyword("to") ||
       parser.parseOperand(store) ||
       parser.parseOptionalAttrDict(result.attributes) ||
@@ -3274,7 +3275,7 @@ mlir::ParseResult IfOp::parse(OpAsmParser &parser, OperationState &result) {
   mlir::Region *elseRegion = result.addRegion();
 
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType cond;
+  OpAsmParser::UnresolvedOperand cond;
   mlir::Type i1Type = builder.getIntegerType(1);
   if (parser.parseOperand(cond) ||
       parser.resolveOperand(cond, i1Type, result.operands))
@@ -3363,10 +3364,10 @@ unsigned fir::getCaseArgumentOffset(llvm::ArrayRef<mlir::Attribute> cases,
   return o;
 }
 
-mlir::ParseResult fir::parseSelector(mlir::OpAsmParser &parser,
-                                     mlir::OperationState &result,
-                                     mlir::OpAsmParser::OperandType &selector,
-                                     mlir::Type &type) {
+mlir::ParseResult
+fir::parseSelector(mlir::OpAsmParser &parser, mlir::OperationState &result,
+                   mlir::OpAsmParser::UnresolvedOperand &selector,
+                   mlir::Type &type) {
   if (parser.parseOperand(selector) || parser.parseColonType(type) ||
       parser.resolveOperand(selector, type, result.operands) ||
       parser.parseLSquare())

diff  --git a/mlir/docs/OpDefinitions.md b/mlir/docs/OpDefinitions.md
index f5b67e273ddfa..eab13fd9893d8 100644
--- a/mlir/docs/OpDefinitions.md
+++ b/mlir/docs/OpDefinitions.md
@@ -778,11 +778,11 @@ declarative parameter to `parse` method argument is detailed below:
     -   Single: `<Attribute-Storage-Type>(e.g. Attribute) &`
     -   Optional: `<Attribute-Storage-Type>(e.g. Attribute) &`
 *   Operand Variables
-    -   Single: `OpAsmParser::OperandType &`
-    -   Optional: `Optional<OpAsmParser::OperandType> &`
-    -   Variadic: `SmallVectorImpl<OpAsmParser::OperandType> &`
+    -   Single: `OpAsmParser::UnresolvedOperand &`
+    -   Optional: `Optional<OpAsmParser::UnresolvedOperand> &`
+    -   Variadic: `SmallVectorImpl<OpAsmParser::UnresolvedOperand> &`
     -   VariadicOfVariadic:
-        `SmallVectorImpl<SmallVector<OpAsmParser::OperandType>> &`
+        `SmallVectorImpl<SmallVector<OpAsmParser::UnresolvedOperand>> &`
 *   Ref Directives
     -   A reference directive is passed to the parser using the same mapping as
         the input operand. For example, a single region would be passed as a

diff  --git a/mlir/docs/Tutorials/Toy/Ch-2.md b/mlir/docs/Tutorials/Toy/Ch-2.md
index a47d420f6efb7..99e6cfe070ffb 100644
--- a/mlir/docs/Tutorials/Toy/Ch-2.md
+++ b/mlir/docs/Tutorials/Toy/Ch-2.md
@@ -639,7 +639,7 @@ mlir::ParseResult PrintOp::parse(mlir::OpAsmParser &parser,
                                  mlir::OperationState &result) {
   // Parse the input operand, the attribute dictionary, and the type of the
   // input.
-  mlir::OpAsmParser::OperandType inputOperand;
+  mlir::OpAsmParser::UnresolvedOperand inputOperand;
   mlir::Type inputType;
   if (parser.parseOperand(inputOperand) ||
       parser.parseOptionalAttrDict(result.attributes) || parser.parseColon() ||

diff  --git a/mlir/examples/toy/Ch2/mlir/Dialect.cpp b/mlir/examples/toy/Ch2/mlir/Dialect.cpp
index f6cf3fdec9315..dbc1efb3d06be 100644
--- a/mlir/examples/toy/Ch2/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch2/mlir/Dialect.cpp
@@ -44,7 +44,7 @@ void ToyDialect::initialize() {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/examples/toy/Ch3/mlir/Dialect.cpp b/mlir/examples/toy/Ch3/mlir/Dialect.cpp
index 4b8b978a818ff..50e2dfc7f4a3e 100644
--- a/mlir/examples/toy/Ch3/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch3/mlir/Dialect.cpp
@@ -44,7 +44,7 @@ void ToyDialect::initialize() {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/examples/toy/Ch4/mlir/Dialect.cpp b/mlir/examples/toy/Ch4/mlir/Dialect.cpp
index 1bd6c9fdc8dc1..0a6195b12d5d4 100644
--- a/mlir/examples/toy/Ch4/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch4/mlir/Dialect.cpp
@@ -106,7 +106,7 @@ void ToyDialect::initialize() {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/examples/toy/Ch5/mlir/Dialect.cpp b/mlir/examples/toy/Ch5/mlir/Dialect.cpp
index ecff26468b29c..f236a1ffe0e5a 100644
--- a/mlir/examples/toy/Ch5/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch5/mlir/Dialect.cpp
@@ -106,7 +106,7 @@ void ToyDialect::initialize() {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/examples/toy/Ch6/mlir/Dialect.cpp b/mlir/examples/toy/Ch6/mlir/Dialect.cpp
index ecff26468b29c..f236a1ffe0e5a 100644
--- a/mlir/examples/toy/Ch6/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch6/mlir/Dialect.cpp
@@ -106,7 +106,7 @@ void ToyDialect::initialize() {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
index bd2edceccfe1a..cc66a5d44b5f4 100644
--- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp
+++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp
@@ -93,7 +93,7 @@ struct ToyInlinerInterface : public DialectInlinerInterface {
 /// of 'printBinaryOp' below.
 static mlir::ParseResult parseBinaryOp(mlir::OpAsmParser &parser,
                                        mlir::OperationState &result) {
-  SmallVector<mlir::OpAsmParser::OperandType, 2> operands;
+  SmallVector<mlir::OpAsmParser::UnresolvedOperand, 2> operands;
   SMLoc operandsLoc = parser.getCurrentLocation();
   Type type;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/2) ||

diff  --git a/mlir/include/mlir/IR/FunctionImplementation.h b/mlir/include/mlir/IR/FunctionImplementation.h
index 271b089ce8113..3d65452b8619b 100644
--- a/mlir/include/mlir/IR/FunctionImplementation.h
+++ b/mlir/include/mlir/IR/FunctionImplementation.h
@@ -58,7 +58,7 @@ using FuncTypeBuilder = function_ref<Type(
 /// attributes and locations of the arguments.
 ParseResult parseFunctionArgumentList(
     OpAsmParser &parser, bool allowAttributes, bool allowVariadic,
-    SmallVectorImpl<OpAsmParser::OperandType> &argNames,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &argNames,
     SmallVectorImpl<Type> &argTypes, SmallVectorImpl<NamedAttrList> &argAttrs,
     SmallVectorImpl<Location> &argLocations, bool &isVariadic);
 
@@ -66,14 +66,13 @@ ParseResult parseFunctionArgumentList(
 /// indicates whether functions with variadic arguments are supported. The
 /// trailing arguments are populated by this function with names, types,
 /// attributes and locations of the arguments and those of the results.
-ParseResult
-parseFunctionSignature(OpAsmParser &parser, bool allowVariadic,
-                       SmallVectorImpl<OpAsmParser::OperandType> &argNames,
-                       SmallVectorImpl<Type> &argTypes,
-                       SmallVectorImpl<NamedAttrList> &argAttrs,
-                       SmallVectorImpl<Location> &argLocations,
-                       bool &isVariadic, SmallVectorImpl<Type> &resultTypes,
-                       SmallVectorImpl<NamedAttrList> &resultAttrs);
+ParseResult parseFunctionSignature(
+    OpAsmParser &parser, bool allowVariadic,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &argNames,
+    SmallVectorImpl<Type> &argTypes, SmallVectorImpl<NamedAttrList> &argAttrs,
+    SmallVectorImpl<Location> &argLocations, bool &isVariadic,
+    SmallVectorImpl<Type> &resultTypes,
+    SmallVectorImpl<NamedAttrList> &resultAttrs);
 
 /// Parser implementation for function-like operations.  Uses
 /// `funcTypeBuilder` to construct the custom function type given lists of

diff  --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h
index 0218e6be15bff..2cdce8b9cfba9 100644
--- a/mlir/include/mlir/IR/OpImplementation.h
+++ b/mlir/include/mlir/IR/OpImplementation.h
@@ -1083,10 +1083,10 @@ class OpAsmParser : public AsmParser {
   //===--------------------------------------------------------------------===//
 
   /// This is the representation of an operand reference.
-  struct OperandType {
-    SMLoc location; // Location of the token.
-    StringRef name;       // Value name, e.g. %42 or %abc
-    unsigned number;      // Number, e.g. 12 for an operand like %xyz#12
+  struct UnresolvedOperand {
+    SMLoc location;  // Location of the token.
+    StringRef name;  // Value name, e.g. %42 or %abc
+    unsigned number; // Number, e.g. 12 for an operand like %xyz#12
   };
 
   /// Parse 
diff erent components, viz., use-info of operand(s), successor(s),
@@ -1096,7 +1096,7 @@ class OpAsmParser : public AsmParser {
   /// skip parsing that component.
   virtual ParseResult parseGenericOperationAfterOpName(
       OperationState &result,
-      Optional<ArrayRef<OperandType>> parsedOperandType = llvm::None,
+      Optional<ArrayRef<UnresolvedOperand>> parsedOperandType = llvm::None,
       Optional<ArrayRef<Block *>> parsedSuccessors = llvm::None,
       Optional<MutableArrayRef<std::unique_ptr<Region>>> parsedRegions =
           llvm::None,
@@ -1104,18 +1104,19 @@ class OpAsmParser : public AsmParser {
       Optional<FunctionType> parsedFnType = llvm::None) = 0;
 
   /// Parse a single operand.
-  virtual ParseResult parseOperand(OperandType &result) = 0;
+  virtual ParseResult parseOperand(UnresolvedOperand &result) = 0;
 
   /// Parse a single operand if present.
-  virtual OptionalParseResult parseOptionalOperand(OperandType &result) = 0;
+  virtual OptionalParseResult
+  parseOptionalOperand(UnresolvedOperand &result) = 0;
 
   /// Parse zero or more SSA comma-separated operand references with a specified
   /// surrounding delimiter, and an optional required operand count.
   virtual ParseResult
-  parseOperandList(SmallVectorImpl<OperandType> &result,
+  parseOperandList(SmallVectorImpl<UnresolvedOperand> &result,
                    int requiredOperandCount = -1,
                    Delimiter delimiter = Delimiter::None) = 0;
-  ParseResult parseOperandList(SmallVectorImpl<OperandType> &result,
+  ParseResult parseOperandList(SmallVectorImpl<UnresolvedOperand> &result,
                                Delimiter delimiter) {
     return parseOperandList(result, /*requiredOperandCount=*/-1, delimiter);
   }
@@ -1124,23 +1125,25 @@ class OpAsmParser : public AsmParser {
   /// references with a specified surrounding delimiter, and an optional
   /// required operand count. A leading comma is expected before the operands.
   virtual ParseResult
-  parseTrailingOperandList(SmallVectorImpl<OperandType> &result,
+  parseTrailingOperandList(SmallVectorImpl<UnresolvedOperand> &result,
                            int requiredOperandCount = -1,
                            Delimiter delimiter = Delimiter::None) = 0;
-  ParseResult parseTrailingOperandList(SmallVectorImpl<OperandType> &result,
-                                       Delimiter delimiter) {
+  ParseResult
+  parseTrailingOperandList(SmallVectorImpl<UnresolvedOperand> &result,
+                           Delimiter delimiter) {
     return parseTrailingOperandList(result, /*requiredOperandCount=*/-1,
                                     delimiter);
   }
 
   /// Resolve an operand to an SSA value, emitting an error on failure.
-  virtual ParseResult resolveOperand(const OperandType &operand, Type type,
+  virtual ParseResult resolveOperand(const UnresolvedOperand &operand,
+                                     Type type,
                                      SmallVectorImpl<Value> &result) = 0;
 
   /// Resolve a list of operands to SSA values, emitting an error on failure, or
   /// appending the results to the list on success. This method should be used
   /// when all operands have the same type.
-  ParseResult resolveOperands(ArrayRef<OperandType> operands, Type type,
+  ParseResult resolveOperands(ArrayRef<UnresolvedOperand> operands, Type type,
                               SmallVectorImpl<Value> &result) {
     for (auto elt : operands)
       if (resolveOperand(elt, type, result))
@@ -1151,7 +1154,7 @@ class OpAsmParser : public AsmParser {
   /// Resolve a list of operands and a list of operand types to SSA values,
   /// emitting an error and returning failure, or appending the results
   /// to the list on success.
-  ParseResult resolveOperands(ArrayRef<OperandType> operands,
+  ParseResult resolveOperands(ArrayRef<UnresolvedOperand> operands,
                               ArrayRef<Type> types, SMLoc loc,
                               SmallVectorImpl<Value> &result) {
     if (operands.size() != types.size())
@@ -1190,16 +1193,17 @@ class OpAsmParser : public AsmParser {
   /// Operand values must come from single-result sources, and be valid
   /// dimensions/symbol identifiers according to mlir::isValidDim/Symbol.
   virtual ParseResult
-  parseAffineMapOfSSAIds(SmallVectorImpl<OperandType> &operands, Attribute &map,
-                         StringRef attrName, NamedAttrList &attrs,
+  parseAffineMapOfSSAIds(SmallVectorImpl<UnresolvedOperand> &operands,
+                         Attribute &map, StringRef attrName,
+                         NamedAttrList &attrs,
                          Delimiter delimiter = Delimiter::Square) = 0;
 
   /// Parses an affine expression where dims and symbols are SSA operands.
   /// Operand values must come from single-result sources, and be valid
   /// dimensions/symbol identifiers according to mlir::isValidDim/Symbol.
   virtual ParseResult
-  parseAffineExprOfSSAIds(SmallVectorImpl<OperandType> &dimOperands,
-                          SmallVectorImpl<OperandType> &symbOperands,
+  parseAffineExprOfSSAIds(SmallVectorImpl<UnresolvedOperand> &dimOperands,
+                          SmallVectorImpl<UnresolvedOperand> &symbOperands,
                           AffineExpr &expr) = 0;
 
   //===--------------------------------------------------------------------===//
@@ -1215,46 +1219,48 @@ class OpAsmParser : public AsmParser {
   /// scope. 'enableNameShadowing' can only be set to true for regions attached
   /// to operations that are 'IsolatedFromAbove'.
   virtual ParseResult parseRegion(Region &region,
-                                  ArrayRef<OperandType> arguments = {},
+                                  ArrayRef<UnresolvedOperand> arguments = {},
                                   ArrayRef<Type> argTypes = {},
                                   ArrayRef<Location> argLocations = {},
                                   bool enableNameShadowing = false) = 0;
 
   /// Parses a region if present.
-  virtual OptionalParseResult
-  parseOptionalRegion(Region &region, ArrayRef<OperandType> arguments = {},
-                      ArrayRef<Type> argTypes = {},
-                      ArrayRef<Location> argLocations = {},
-                      bool enableNameShadowing = false) = 0;
+  virtual OptionalParseResult parseOptionalRegion(
+      Region &region, ArrayRef<UnresolvedOperand> arguments = {},
+      ArrayRef<Type> argTypes = {}, ArrayRef<Location> argLocations = {},
+      bool enableNameShadowing = false) = 0;
 
   /// Parses a region if present. If the region is present, a new region is
   /// allocated and placed in `region`. If no region is present or on failure,
   /// `region` remains untouched.
-  virtual OptionalParseResult parseOptionalRegion(
-      std::unique_ptr<Region> &region, ArrayRef<OperandType> arguments = {},
-      ArrayRef<Type> argTypes = {}, bool enableNameShadowing = false) = 0;
+  virtual OptionalParseResult
+  parseOptionalRegion(std::unique_ptr<Region> &region,
+                      ArrayRef<UnresolvedOperand> arguments = {},
+                      ArrayRef<Type> argTypes = {},
+                      bool enableNameShadowing = false) = 0;
 
   /// Parse a region argument, this argument is resolved when calling
   /// 'parseRegion'.
-  virtual ParseResult parseRegionArgument(OperandType &argument) = 0;
+  virtual ParseResult parseRegionArgument(UnresolvedOperand &argument) = 0;
 
   /// Parse zero or more region arguments with a specified surrounding
   /// delimiter, and an optional required argument count. Region arguments
   /// define new values; so this also checks if values with the same names have
   /// not been defined yet.
   virtual ParseResult
-  parseRegionArgumentList(SmallVectorImpl<OperandType> &result,
+  parseRegionArgumentList(SmallVectorImpl<UnresolvedOperand> &result,
                           int requiredOperandCount = -1,
                           Delimiter delimiter = Delimiter::None) = 0;
   virtual ParseResult
-  parseRegionArgumentList(SmallVectorImpl<OperandType> &result,
+  parseRegionArgumentList(SmallVectorImpl<UnresolvedOperand> &result,
                           Delimiter delimiter) {
     return parseRegionArgumentList(result, /*requiredOperandCount=*/-1,
                                    delimiter);
   }
 
   /// Parse a region argument if present.
-  virtual ParseResult parseOptionalRegionArgument(OperandType &argument) = 0;
+  virtual ParseResult
+  parseOptionalRegionArgument(UnresolvedOperand &argument) = 0;
 
   //===--------------------------------------------------------------------===//
   // Successor Parsing
@@ -1276,8 +1282,8 @@ class OpAsmParser : public AsmParser {
 
   /// Parse a list of assignments of the form
   ///   (%x1 = %y1, %x2 = %y2, ...)
-  ParseResult parseAssignmentList(SmallVectorImpl<OperandType> &lhs,
-                                  SmallVectorImpl<OperandType> &rhs) {
+  ParseResult parseAssignmentList(SmallVectorImpl<UnresolvedOperand> &lhs,
+                                  SmallVectorImpl<UnresolvedOperand> &rhs) {
     OptionalParseResult result = parseOptionalAssignmentList(lhs, rhs);
     if (!result.hasValue())
       return emitError(getCurrentLocation(), "expected '('");
@@ -1285,14 +1291,15 @@ class OpAsmParser : public AsmParser {
   }
 
   virtual OptionalParseResult
-  parseOptionalAssignmentList(SmallVectorImpl<OperandType> &lhs,
-                              SmallVectorImpl<OperandType> &rhs) = 0;
+  parseOptionalAssignmentList(SmallVectorImpl<UnresolvedOperand> &lhs,
+                              SmallVectorImpl<UnresolvedOperand> &rhs) = 0;
 
   /// Parse a list of assignments of the form
   ///   (%x1 = %y1 : type1, %x2 = %y2 : type2, ...)
-  ParseResult parseAssignmentListWithTypes(SmallVectorImpl<OperandType> &lhs,
-                                           SmallVectorImpl<OperandType> &rhs,
-                                           SmallVectorImpl<Type> &types) {
+  ParseResult
+  parseAssignmentListWithTypes(SmallVectorImpl<UnresolvedOperand> &lhs,
+                               SmallVectorImpl<UnresolvedOperand> &rhs,
+                               SmallVectorImpl<Type> &types) {
     OptionalParseResult result =
         parseOptionalAssignmentListWithTypes(lhs, rhs, types);
     if (!result.hasValue())
@@ -1301,17 +1308,17 @@ class OpAsmParser : public AsmParser {
   }
 
   virtual OptionalParseResult
-  parseOptionalAssignmentListWithTypes(SmallVectorImpl<OperandType> &lhs,
-                                       SmallVectorImpl<OperandType> &rhs,
+  parseOptionalAssignmentListWithTypes(SmallVectorImpl<UnresolvedOperand> &lhs,
+                                       SmallVectorImpl<UnresolvedOperand> &rhs,
                                        SmallVectorImpl<Type> &types) = 0;
 
 private:
   /// Parse either an operand list or a region argument list depending on
   /// whether isOperandList is true.
-  ParseResult parseOperandOrRegionArgList(SmallVectorImpl<OperandType> &result,
-                                          bool isOperandList,
-                                          int requiredOperandCount,
-                                          Delimiter delimiter);
+  ParseResult
+  parseOperandOrRegionArgList(SmallVectorImpl<UnresolvedOperand> &result,
+                              bool isOperandList, int requiredOperandCount,
+                              Delimiter delimiter);
 };
 
 //===--------------------------------------------------------------------===//

diff  --git a/mlir/include/mlir/Interfaces/ViewLikeInterface.h b/mlir/include/mlir/Interfaces/ViewLikeInterface.h
index 8b07972af3890..8c18ab37017b1 100644
--- a/mlir/include/mlir/Interfaces/ViewLikeInterface.h
+++ b/mlir/include/mlir/Interfaces/ViewLikeInterface.h
@@ -105,7 +105,8 @@ void printOperandsOrIntegersSizesList(OpAsmPrinter &printer, Operation *op,
 ///   1. `result` is filled with the i64 ArrayAttr "[`dynVal`, 7, 42, `dynVal`]"
 ///   2. `ssa` is filled with "[%arg0, %arg1]".
 ParseResult parseOperandsOrIntegersOffsetsOrStridesList(
-    OpAsmParser &parser, SmallVectorImpl<OpAsmParser::OperandType> &values,
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
     ArrayAttr &integers);
 
 /// Pasrer hook for custom directive in assemblyFormat.
@@ -122,7 +123,8 @@ ParseResult parseOperandsOrIntegersOffsetsOrStridesList(
 ///   1. `result` is filled with the i64 ArrayAttr "[`dynVal`, 7, 42, `dynVal`]"
 ///   2. `ssa` is filled with "[%arg0, %arg1]".
 ParseResult parseOperandsOrIntegersSizesList(
-    OpAsmParser &parser, SmallVectorImpl<OpAsmParser::OperandType> &values,
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
     ArrayAttr &integers);
 
 /// Verify that a the `values` has as many elements as the number of entries in

diff  --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index a43da29a3f431..09b9acadab97f 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -446,7 +446,7 @@ static void printDimAndSymbolList(Operation::operand_iterator begin,
 ParseResult mlir::parseDimAndSymbolList(OpAsmParser &parser,
                                         SmallVectorImpl<Value> &operands,
                                         unsigned &numDims) {
-  SmallVector<OpAsmParser::OperandType, 8> opInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> opInfos;
   if (parser.parseOperandList(opInfos, OpAsmParser::Delimiter::Paren))
     return failure();
   // Store number of dimensions for validation by caller.
@@ -1041,17 +1041,17 @@ void AffineDmaStartOp::print(OpAsmPrinter &p) {
 //
 ParseResult AffineDmaStartOp::parse(OpAsmParser &parser,
                                     OperationState &result) {
-  OpAsmParser::OperandType srcMemRefInfo;
+  OpAsmParser::UnresolvedOperand srcMemRefInfo;
   AffineMapAttr srcMapAttr;
-  SmallVector<OpAsmParser::OperandType, 4> srcMapOperands;
-  OpAsmParser::OperandType dstMemRefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> srcMapOperands;
+  OpAsmParser::UnresolvedOperand dstMemRefInfo;
   AffineMapAttr dstMapAttr;
-  SmallVector<OpAsmParser::OperandType, 4> dstMapOperands;
-  OpAsmParser::OperandType tagMemRefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> dstMapOperands;
+  OpAsmParser::UnresolvedOperand tagMemRefInfo;
   AffineMapAttr tagMapAttr;
-  SmallVector<OpAsmParser::OperandType, 4> tagMapOperands;
-  OpAsmParser::OperandType numElementsInfo;
-  SmallVector<OpAsmParser::OperandType, 2> strideInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> tagMapOperands;
+  OpAsmParser::UnresolvedOperand numElementsInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> strideInfo;
 
   SmallVector<Type, 3> types;
   auto indexType = parser.getBuilder().getIndexType();
@@ -1186,12 +1186,12 @@ void AffineDmaWaitOp::print(OpAsmPrinter &p) {
 //
 ParseResult AffineDmaWaitOp::parse(OpAsmParser &parser,
                                    OperationState &result) {
-  OpAsmParser::OperandType tagMemRefInfo;
+  OpAsmParser::UnresolvedOperand tagMemRefInfo;
   AffineMapAttr tagMapAttr;
-  SmallVector<OpAsmParser::OperandType, 2> tagMapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> tagMapOperands;
   Type type;
   auto indexType = parser.getBuilder().getIndexType();
-  OpAsmParser::OperandType numElementsInfo;
+  OpAsmParser::UnresolvedOperand numElementsInfo;
 
   // Parse tag memref, its map operands, and dma size.
   if (parser.parseOperand(tagMemRefInfo) ||
@@ -1349,7 +1349,7 @@ static ParseResult parseBound(bool isLower, OperationState &result,
                                : AffineForOp::getUpperBoundAttrName();
 
   // Parse ssa-id as identity map.
-  SmallVector<OpAsmParser::OperandType, 1> boundOpInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> boundOpInfos;
   if (p.parseOperandList(boundOpInfos))
     return failure();
 
@@ -1430,7 +1430,7 @@ static ParseResult parseBound(bool isLower, OperationState &result,
 
 ParseResult AffineForOp::parse(OpAsmParser &parser, OperationState &result) {
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType inductionVariable;
+  OpAsmParser::UnresolvedOperand inductionVariable;
   // Parse the induction variable followed by '='.
   if (parser.parseRegionArgument(inductionVariable) || parser.parseEqual())
     return failure();
@@ -1461,7 +1461,7 @@ ParseResult AffineForOp::parse(OpAsmParser &parser, OperationState &result) {
   }
 
   // Parse the optional initial iteration arguments.
-  SmallVector<OpAsmParser::OperandType, 4> regionArgs, operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> regionArgs, operands;
   SmallVector<Type, 4> argTypes;
   regionArgs.push_back(inductionVariable);
 
@@ -2317,9 +2317,9 @@ ParseResult AffineLoadOp::parse(OpAsmParser &parser, OperationState &result) {
   auto indexTy = builder.getIndexType();
 
   MemRefType type;
-  OpAsmParser::OperandType memrefInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
   AffineMapAttr mapAttr;
-  SmallVector<OpAsmParser::OperandType, 1> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> mapOperands;
   return failure(
       parser.parseOperand(memrefInfo) ||
       parser.parseAffineMapOfSSAIds(mapOperands, mapAttr,
@@ -2453,10 +2453,10 @@ ParseResult AffineStoreOp::parse(OpAsmParser &parser, OperationState &result) {
   auto indexTy = parser.getBuilder().getIndexType();
 
   MemRefType type;
-  OpAsmParser::OperandType storeValueInfo;
-  OpAsmParser::OperandType memrefInfo;
+  OpAsmParser::UnresolvedOperand storeValueInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
   AffineMapAttr mapAttr;
-  SmallVector<OpAsmParser::OperandType, 1> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> mapOperands;
   return failure(parser.parseOperand(storeValueInfo) || parser.parseComma() ||
                  parser.parseOperand(memrefInfo) ||
                  parser.parseAffineMapOfSSAIds(mapOperands, mapAttr,
@@ -2539,8 +2539,8 @@ static ParseResult parseAffineMinMaxOp(OpAsmParser &parser,
                                        OperationState &result) {
   auto &builder = parser.getBuilder();
   auto indexType = builder.getIndexType();
-  SmallVector<OpAsmParser::OperandType, 8> dimInfos;
-  SmallVector<OpAsmParser::OperandType, 8> symInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> dimInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> symInfos;
   AffineMapAttr mapAttr;
   return failure(
       parser.parseAttribute(mapAttr, T::getMapAttrName(), result.attributes) ||
@@ -2789,13 +2789,13 @@ ParseResult AffinePrefetchOp::parse(OpAsmParser &parser,
   auto indexTy = builder.getIndexType();
 
   MemRefType type;
-  OpAsmParser::OperandType memrefInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
   IntegerAttr hintInfo;
   auto i32Type = parser.getBuilder().getIntegerType(32);
   StringRef readOrWrite, cacheType;
 
   AffineMapAttr mapAttr;
-  SmallVector<OpAsmParser::OperandType, 1> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> mapOperands;
   if (parser.parseOperand(memrefInfo) ||
       parser.parseAffineMapOfSSAIds(mapOperands, mapAttr,
                                     AffinePrefetchOp::getMapAttrName(),
@@ -3262,7 +3262,7 @@ void AffineParallelOp::print(OpAsmPrinter &p) {
 /// `operands` to accept `uniqueOperands` instead.
 static void deduplicateAndResolveOperands(
     OpAsmParser &parser,
-    ArrayRef<SmallVector<OpAsmParser::OperandType>> operands,
+    ArrayRef<SmallVector<OpAsmParser::UnresolvedOperand>> operands,
     SmallVectorImpl<Value> &uniqueOperands,
     SmallVectorImpl<AffineExpr> &replacements, AffineExprKind kind) {
   assert((kind == AffineExprKind::DimId || kind == AffineExprKind::SymbolId) &&
@@ -3328,10 +3328,10 @@ static ParseResult parseAffineMapWithMinMax(OpAsmParser &parser,
   }
 
   SmallVector<AffineExpr> flatExprs;
-  SmallVector<SmallVector<OpAsmParser::OperandType>> flatDimOperands;
-  SmallVector<SmallVector<OpAsmParser::OperandType>> flatSymOperands;
+  SmallVector<SmallVector<OpAsmParser::UnresolvedOperand>> flatDimOperands;
+  SmallVector<SmallVector<OpAsmParser::UnresolvedOperand>> flatSymOperands;
   SmallVector<int32_t> numMapsPerGroup;
-  SmallVector<OpAsmParser::OperandType> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand> mapOperands;
   do {
     if (succeeded(parser.parseOptionalKeyword(
             kind == MinMaxKind::Min ? "min" : "max"))) {
@@ -3345,11 +3345,11 @@ static ParseResult parseAffineMapWithMinMax(OpAsmParser &parser,
       llvm::append_range(flatExprs, map.getValue().getResults());
       auto operandsRef = llvm::makeArrayRef(mapOperands);
       auto dimsRef = operandsRef.take_front(map.getValue().getNumDims());
-      SmallVector<OpAsmParser::OperandType> dims(dimsRef.begin(),
-                                                 dimsRef.end());
+      SmallVector<OpAsmParser::UnresolvedOperand> dims(dimsRef.begin(),
+                                                       dimsRef.end());
       auto symsRef = operandsRef.drop_front(map.getValue().getNumDims());
-      SmallVector<OpAsmParser::OperandType> syms(symsRef.begin(),
-                                                 symsRef.end());
+      SmallVector<OpAsmParser::UnresolvedOperand> syms(symsRef.begin(),
+                                                       symsRef.end());
       flatDimOperands.append(map.getValue().getNumResults(), dims);
       flatSymOperands.append(map.getValue().getNumResults(), syms);
       numMapsPerGroup.push_back(map.getValue().getNumResults());
@@ -3408,7 +3408,7 @@ ParseResult AffineParallelOp::parse(OpAsmParser &parser,
                                     OperationState &result) {
   auto &builder = parser.getBuilder();
   auto indexType = builder.getIndexType();
-  SmallVector<OpAsmParser::OperandType, 4> ivs;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> ivs;
   if (parser.parseRegionArgumentList(ivs, /*requiredOperandCount=*/-1,
                                      OpAsmParser::Delimiter::Paren) ||
       parser.parseEqual() ||
@@ -3419,7 +3419,7 @@ ParseResult AffineParallelOp::parse(OpAsmParser &parser,
 
   AffineMapAttr stepsMapAttr;
   NamedAttrList stepsAttrs;
-  SmallVector<OpAsmParser::OperandType, 4> stepsMapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> stepsMapOperands;
   if (failed(parser.parseOptionalKeyword("step"))) {
     SmallVector<int64_t, 4> steps(ivs.size(), 1);
     result.addAttribute(AffineParallelOp::getStepsAttrName(),
@@ -3561,9 +3561,9 @@ ParseResult AffineVectorLoadOp::parse(OpAsmParser &parser,
 
   MemRefType memrefType;
   VectorType resultType;
-  OpAsmParser::OperandType memrefInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
   AffineMapAttr mapAttr;
-  SmallVector<OpAsmParser::OperandType, 1> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> mapOperands;
   return failure(
       parser.parseOperand(memrefInfo) ||
       parser.parseAffineMapOfSSAIds(mapOperands, mapAttr,
@@ -3650,10 +3650,10 @@ ParseResult AffineVectorStoreOp::parse(OpAsmParser &parser,
 
   MemRefType memrefType;
   VectorType resultType;
-  OpAsmParser::OperandType storeValueInfo;
-  OpAsmParser::OperandType memrefInfo;
+  OpAsmParser::UnresolvedOperand storeValueInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
   AffineMapAttr mapAttr;
-  SmallVector<OpAsmParser::OperandType, 1> mapOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 1> mapOperands;
   return failure(
       parser.parseOperand(storeValueInfo) || parser.parseComma() ||
       parser.parseOperand(memrefInfo) ||

diff  --git a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
index fd19cdac51f65..74b77dc9cbd63 100644
--- a/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
+++ b/mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp
@@ -1806,7 +1806,7 @@ OpFoldResult arith::SelectOp::fold(ArrayRef<Attribute> operands) {
 
 ParseResult SelectOp::parse(OpAsmParser &parser, OperationState &result) {
   Type conditionType, resultType;
-  SmallVector<OpAsmParser::OperandType, 3> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> operands;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/3) ||
       parser.parseOptionalAttrDict(result.attributes) ||
       parser.parseColonType(resultType))

diff  --git a/mlir/lib/Dialect/Async/IR/Async.cpp b/mlir/lib/Dialect/Async/IR/Async.cpp
index 546a39f38f036..55f7f7a6440c4 100644
--- a/mlir/lib/Dialect/Async/IR/Async.cpp
+++ b/mlir/lib/Dialect/Async/IR/Async.cpp
@@ -167,7 +167,7 @@ ParseResult ExecuteOp::parse(OpAsmParser &parser, OperationState &result) {
 
   // Parse dependency tokens.
   if (succeeded(parser.parseOptionalLSquare())) {
-    SmallVector<OpAsmParser::OperandType, 4> tokenArgs;
+    SmallVector<OpAsmParser::UnresolvedOperand, 4> tokenArgs;
     if (parser.parseOperandList(tokenArgs) ||
         parser.resolveOperands(tokenArgs, tokenTy, result.operands) ||
         parser.parseRSquare())
@@ -177,8 +177,8 @@ ParseResult ExecuteOp::parse(OpAsmParser &parser, OperationState &result) {
   }
 
   // Parse async value operands (%value as %unwrapped : !async.value<!type>).
-  SmallVector<OpAsmParser::OperandType, 4> valueArgs;
-  SmallVector<OpAsmParser::OperandType, 4> unwrappedArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> valueArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> unwrappedArgs;
   SmallVector<Type, 4> valueTypes;
   SmallVector<Type, 4> unwrappedTypes;
 

diff  --git a/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp b/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
index 11d719a1b5492..03f0998ac85fc 100644
--- a/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
+++ b/mlir/lib/Dialect/ControlFlow/IR/ControlFlowOps.cpp
@@ -481,11 +481,11 @@ void SwitchOp::build(OpBuilder &builder, OperationState &result, Value value,
 ///             ( `,` integer `:` bb-id (`(` ssa-use-and-type-list `)`)? )*
 static ParseResult parseSwitchOpCases(
     OpAsmParser &parser, Type &flagType, Block *&defaultDestination,
-    SmallVectorImpl<OpAsmParser::OperandType> &defaultOperands,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &defaultOperands,
     SmallVectorImpl<Type> &defaultOperandTypes,
     DenseIntElementsAttr &caseValues,
     SmallVectorImpl<Block *> &caseDestinations,
-    SmallVectorImpl<SmallVector<OpAsmParser::OperandType>> &caseOperands,
+    SmallVectorImpl<SmallVector<OpAsmParser::UnresolvedOperand>> &caseOperands,
     SmallVectorImpl<SmallVector<Type>> &caseOperandTypes) {
   if (parser.parseKeyword("default") || parser.parseColon() ||
       parser.parseSuccessor(defaultDestination))
@@ -505,7 +505,7 @@ static ParseResult parseSwitchOpCases(
     values.push_back(APInt(bitWidth, value));
 
     Block *destination;
-    SmallVector<OpAsmParser::OperandType> operands;
+    SmallVector<OpAsmParser::UnresolvedOperand> operands;
     SmallVector<Type> operandTypes;
     if (failed(parser.parseColon()) ||
         failed(parser.parseSuccessor(destination)))

diff  --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
index 673ca4e7adbd0..990a2dc40de04 100644
--- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
@@ -475,11 +475,11 @@ void LaunchOp::print(OpAsmPrinter &p) {
 // SSA value uses.
 static ParseResult
 parseSizeAssignment(OpAsmParser &parser,
-                    MutableArrayRef<OpAsmParser::OperandType> sizes,
-                    MutableArrayRef<OpAsmParser::OperandType> regionSizes,
-                    MutableArrayRef<OpAsmParser::OperandType> indices) {
+                    MutableArrayRef<OpAsmParser::UnresolvedOperand> sizes,
+                    MutableArrayRef<OpAsmParser::UnresolvedOperand> regionSizes,
+                    MutableArrayRef<OpAsmParser::UnresolvedOperand> indices) {
   assert(indices.size() == 3 && "space for three indices expected");
-  SmallVector<OpAsmParser::OperandType, 3> args;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> args;
   if (parser.parseRegionArgumentList(args, /*requiredOperandCount=*/3,
                                      OpAsmParser::Delimiter::Paren) ||
       parser.parseKeyword("in") || parser.parseLParen())
@@ -506,17 +506,17 @@ parseSizeAssignment(OpAsmParser &parser,
 /// ssa-reassignment ::= `(` ssa-id `=` ssa-use (`,` ssa-id `=` ssa-use)* `)`
 ParseResult LaunchOp::parse(OpAsmParser &parser, OperationState &result) {
   // Sizes of the grid and block.
-  SmallVector<OpAsmParser::OperandType, LaunchOp::kNumConfigOperands> sizes(
-      LaunchOp::kNumConfigOperands);
-  MutableArrayRef<OpAsmParser::OperandType> sizesRef(sizes);
+  SmallVector<OpAsmParser::UnresolvedOperand, LaunchOp::kNumConfigOperands>
+      sizes(LaunchOp::kNumConfigOperands);
+  MutableArrayRef<OpAsmParser::UnresolvedOperand> sizesRef(sizes);
 
   // Actual (data) operands passed to the kernel.
-  SmallVector<OpAsmParser::OperandType, 4> dataOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> dataOperands;
 
   // Region arguments to be created.
-  SmallVector<OpAsmParser::OperandType, 16> regionArgs(
+  SmallVector<OpAsmParser::UnresolvedOperand, 16> regionArgs(
       LaunchOp::kNumConfigRegionAttributes);
-  MutableArrayRef<OpAsmParser::OperandType> regionArgsRef(regionArgs);
+  MutableArrayRef<OpAsmParser::UnresolvedOperand> regionArgsRef(regionArgs);
 
   // Parse the size assignment segments: the first segment assigns grid sizes
   // and defines values for block identifiers; the second segment assigns block
@@ -535,7 +535,7 @@ ParseResult LaunchOp::parse(OpAsmParser &parser, OperationState &result) {
                              result.operands))
     return failure();
 
-  OpAsmParser::OperandType dynamicSharedMemorySize;
+  OpAsmParser::UnresolvedOperand dynamicSharedMemorySize;
   if (!parser.parseOptionalKeyword(
           LaunchOp::getDynamicSharedMemorySizeKeyword()))
     if (parser.parseOperand(dynamicSharedMemorySize) ||
@@ -667,10 +667,10 @@ LogicalResult LaunchFuncOp::verify() {
   return success();
 }
 
-static ParseResult
-parseLaunchFuncOperands(OpAsmParser &parser,
-                        SmallVectorImpl<OpAsmParser::OperandType> &argNames,
-                        SmallVectorImpl<Type> &argTypes) {
+static ParseResult parseLaunchFuncOperands(
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &argNames,
+    SmallVectorImpl<Type> &argTypes) {
   if (parser.parseOptionalKeyword("args"))
     return success();
   SmallVector<NamedAttrList> argAttrs;
@@ -769,7 +769,7 @@ void GPUFuncOp::build(OpBuilder &builder, OperationState &result,
 /// keyword provided as argument.
 static ParseResult
 parseAttributions(OpAsmParser &parser, StringRef keyword,
-                  SmallVectorImpl<OpAsmParser::OperandType> &args,
+                  SmallVectorImpl<OpAsmParser::UnresolvedOperand> &args,
                   SmallVectorImpl<Type> &argTypes) {
   // If we could not parse the keyword, just assume empty list and succeed.
   if (failed(parser.parseOptionalKeyword(keyword)))
@@ -783,7 +783,7 @@ parseAttributions(OpAsmParser &parser, StringRef keyword,
     return success();
 
   do {
-    OpAsmParser::OperandType arg;
+    OpAsmParser::UnresolvedOperand arg;
     Type type;
 
     if (parser.parseRegionArgument(arg) || parser.parseColonType(type))
@@ -802,7 +802,7 @@ parseAttributions(OpAsmParser &parser, StringRef keyword,
 ///                 (`->` function-result-list)? memory-attribution `kernel`?
 ///                 function-attributes? region
 ParseResult GPUFuncOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType> entryArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand> entryArgs;
   SmallVector<NamedAttrList> argAttrs;
   SmallVector<NamedAttrList> resultAttrs;
   SmallVector<Type> argTypes;
@@ -1041,7 +1041,7 @@ LogicalResult MemcpyOp::verify() {
 
 static ParseResult parseAsyncDependencies(
     OpAsmParser &parser, Type &asyncTokenType,
-    SmallVectorImpl<OpAsmParser::OperandType> &asyncDependencies) {
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &asyncDependencies) {
   auto loc = parser.getCurrentLocation();
   if (succeeded(parser.parseOptionalKeyword("async"))) {
     if (parser.getNumResults() == 0)

diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index 0184c511ba945..ff93a506b4b53 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -113,7 +113,7 @@ static ParseResult parseCmpOp(OpAsmParser &parser, OperationState &result) {
   Builder &builder = parser.getBuilder();
 
   StringAttr predicateAttr;
-  OpAsmParser::OperandType lhs, rhs;
+  OpAsmParser::UnresolvedOperand lhs, rhs;
   Type type;
   SMLoc predicateLoc, trailingTypeLoc;
   if (parser.getCurrentLocation(&predicateLoc) ||
@@ -200,7 +200,7 @@ void AllocaOp::print(OpAsmPrinter &p) {
 // <operation> ::= `llvm.alloca` ssa-use `x` type attribute-dict?
 //                 `:` type `,` type
 ParseResult AllocaOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType arraySize;
+  OpAsmParser::UnresolvedOperand arraySize;
   Type type, elemType;
   SMLoc trailingTypeLoc;
   if (parser.parseOperand(arraySize) || parser.parseKeyword("x") ||
@@ -283,7 +283,7 @@ void SwitchOp::build(OpBuilder &builder, OperationState &result, Value value,
 static ParseResult parseSwitchOpCases(
     OpAsmParser &parser, Type flagType, ElementsAttr &caseValues,
     SmallVectorImpl<Block *> &caseDestinations,
-    SmallVectorImpl<SmallVector<OpAsmParser::OperandType>> &caseOperands,
+    SmallVectorImpl<SmallVector<OpAsmParser::UnresolvedOperand>> &caseOperands,
     SmallVectorImpl<SmallVector<Type>> &caseOperandTypes) {
   SmallVector<APInt> values;
   unsigned bitWidth = flagType.getIntOrFloatBitWidth();
@@ -298,7 +298,7 @@ static ParseResult parseSwitchOpCases(
     values.push_back(APInt(bitWidth, value));
 
     Block *destination;
-    SmallVector<OpAsmParser::OperandType> operands;
+    SmallVector<OpAsmParser::UnresolvedOperand> operands;
     SmallVector<Type> operandTypes;
     if (parser.parseColon() || parser.parseSuccessor(destination))
       return failure();
@@ -489,7 +489,7 @@ void GEPOp::build(OpBuilder &builder, OperationState &result, Type resultType,
 
 static ParseResult
 parseGEPIndices(OpAsmParser &parser,
-                SmallVectorImpl<OpAsmParser::OperandType> &indices,
+                SmallVectorImpl<OpAsmParser::UnresolvedOperand> &indices,
                 DenseIntElementsAttr &structIndices) {
   SmallVector<int32_t> constantIndices;
   do {
@@ -657,7 +657,7 @@ static Type getLoadStoreElementType(OpAsmParser &parser, Type type,
 
 // <operation> ::= `llvm.load` `volatile` ssa-use attribute-dict? `:` type
 ParseResult LoadOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType addr;
+  OpAsmParser::UnresolvedOperand addr;
   Type type;
   SMLoc trailingTypeLoc;
 
@@ -707,7 +707,7 @@ void StoreOp::print(OpAsmPrinter &p) {
 // <operation> ::= `llvm.store` `volatile` ssa-use `,` ssa-use
 //                 attribute-dict? `:` type
 ParseResult StoreOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType addr, value;
+  OpAsmParser::UnresolvedOperand addr, value;
   Type type;
   SMLoc trailingTypeLoc;
 
@@ -788,7 +788,7 @@ void InvokeOp::print(OpAsmPrinter &p) {
 ///                  `unwind` bb-id (`[` ssa-use-and-type-list `]`)?
 ///                  attribute-dict? `:` function-type
 ParseResult InvokeOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 8> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> operands;
   FunctionType funcType;
   SymbolRefAttr funcAttr;
   SMLoc trailingTypeLoc;
@@ -948,7 +948,7 @@ ParseResult LandingpadOp::parse(OpAsmParser &parser, OperationState &result) {
   while (succeeded(parser.parseOptionalLParen()) &&
          (succeeded(parser.parseOptionalKeyword("filter")) ||
           succeeded(parser.parseOptionalKeyword("catch")))) {
-    OpAsmParser::OperandType operand;
+    OpAsmParser::UnresolvedOperand operand;
     Type ty;
     if (parser.parseOperand(operand) || parser.parseColon() ||
         parser.parseType(ty) ||
@@ -1075,7 +1075,7 @@ void CallOp::print(OpAsmPrinter &p) {
 // <operation> ::= `llvm.call` (function-id | ssa-use) `(` ssa-use-list `)`
 //                 attribute-dict? `:` function-type
 ParseResult CallOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 8> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> operands;
   Type type;
   SymbolRefAttr funcAttr;
   SMLoc trailingTypeLoc;
@@ -1137,7 +1137,7 @@ ParseResult CallOp::parse(OpAsmParser &parser, OperationState &result) {
     auto wrappedFuncType = LLVM::LLVMPointerType::get(llvmFuncType);
 
     auto funcArguments =
-        ArrayRef<OpAsmParser::OperandType>(operands).drop_front();
+        ArrayRef<OpAsmParser::UnresolvedOperand>(operands).drop_front();
 
     // Make sure that the first operand (indirect callee) matches the wrapped
     // LLVM IR function type, and that the types of the other call operands
@@ -1180,7 +1180,7 @@ void ExtractElementOp::print(OpAsmPrinter &p) {
 ParseResult ExtractElementOp::parse(OpAsmParser &parser,
                                     OperationState &result) {
   SMLoc loc;
-  OpAsmParser::OperandType vector, position;
+  OpAsmParser::UnresolvedOperand vector, position;
   Type type, positionType;
   if (parser.getCurrentLocation(&loc) || parser.parseOperand(vector) ||
       parser.parseLSquare() || parser.parseOperand(position) ||
@@ -1315,7 +1315,7 @@ static Type getInsertExtractValueElementType(Type containerType,
 //                 `[` integer-literal (`,` integer-literal)* `]`
 //                 attribute-dict? `:` type
 ParseResult ExtractValueOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType container;
+  OpAsmParser::UnresolvedOperand container;
   Type containerType;
   ArrayAttr positionAttr;
   SMLoc attributeLoc, trailingTypeLoc;
@@ -1400,7 +1400,7 @@ void InsertElementOp::print(OpAsmPrinter &p) {
 ParseResult InsertElementOp::parse(OpAsmParser &parser,
                                    OperationState &result) {
   SMLoc loc;
-  OpAsmParser::OperandType vector, value, position;
+  OpAsmParser::UnresolvedOperand vector, value, position;
   Type vectorType, positionType;
   if (parser.getCurrentLocation(&loc) || parser.parseOperand(value) ||
       parser.parseComma() || parser.parseOperand(vector) ||
@@ -1449,7 +1449,7 @@ void InsertValueOp::print(OpAsmPrinter &p) {
 //                 `[` integer-literal (`,` integer-literal)* `]`
 //                 attribute-dict? `:` type
 ParseResult InsertValueOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType container, value;
+  OpAsmParser::UnresolvedOperand container, value;
   Type containerType;
   ArrayAttr positionAttr;
   SMLoc attributeLoc, trailingTypeLoc;
@@ -1917,7 +1917,7 @@ void ShuffleVectorOp::print(OpAsmPrinter &p) {
 ParseResult ShuffleVectorOp::parse(OpAsmParser &parser,
                                    OperationState &result) {
   SMLoc loc;
-  OpAsmParser::OperandType v1, v2;
+  OpAsmParser::UnresolvedOperand v1, v2;
   ArrayAttr maskAttr;
   Type typeV1, typeV2;
   if (parser.getCurrentLocation(&loc) || parser.parseOperand(v1) ||
@@ -2046,7 +2046,7 @@ ParseResult LLVMFuncOp::parse(OpAsmParser &parser, OperationState &result) {
                            parser, result, LLVM::Linkage::External)));
 
   StringAttr nameAttr;
-  SmallVector<OpAsmParser::OperandType> entryArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand> entryArgs;
   SmallVector<NamedAttrList> argAttrs;
   SmallVector<NamedAttrList> resultAttrs;
   SmallVector<Type> argTypes;
@@ -2287,7 +2287,7 @@ void AtomicRMWOp::print(OpAsmPrinter &p) {
 //                 attribute-dict? `:` type
 ParseResult AtomicRMWOp::parse(OpAsmParser &parser, OperationState &result) {
   Type type;
-  OpAsmParser::OperandType ptr, val;
+  OpAsmParser::UnresolvedOperand ptr, val;
   if (parseAtomicBinOp(parser, result, "bin_op") || parser.parseOperand(ptr) ||
       parser.parseComma() || parser.parseOperand(val) ||
       parseAtomicOrdering(parser, result, "ordering") ||
@@ -2359,7 +2359,7 @@ ParseResult AtomicCmpXchgOp::parse(OpAsmParser &parser,
                                    OperationState &result) {
   auto &builder = parser.getBuilder();
   Type type;
-  OpAsmParser::OperandType ptr, cmp, val;
+  OpAsmParser::UnresolvedOperand ptr, cmp, val;
   if (parser.parseOperand(ptr) || parser.parseComma() ||
       parser.parseOperand(cmp) || parser.parseComma() ||
       parser.parseOperand(val) ||

diff  --git a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
index 5256be06d6d5a..9b909a2b1a5bb 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
@@ -51,7 +51,7 @@ ParseResult VoteBallotOp::parse(OpAsmParser &parser, OperationState &result) {
   auto int32Ty = IntegerType::get(context, 32);
   auto int1Ty = IntegerType::get(context, 1);
 
-  SmallVector<OpAsmParser::OperandType, 8> ops;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> ops;
   Type type;
   return failure(parser.parseOperandList(ops) ||
                  parser.parseOptionalAttrDict(result.attributes) ||

diff  --git a/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
index 278f236acba08..0efb282e6813a 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
@@ -40,7 +40,7 @@ using namespace ROCDL;
 //     `llvm.amdgcn.buffer.load.* %rsrc, %vindex, %offset, %glc, %slc :
 //     result_type`
 ParseResult MubufLoadOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 8> ops;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> ops;
   Type type;
   if (parser.parseOperandList(ops, 5) || parser.parseColonType(type) ||
       parser.addTypeToList(type, result.types))
@@ -63,7 +63,7 @@ void MubufLoadOp::print(OpAsmPrinter &p) {
 //     `llvm.amdgcn.buffer.store.* %vdata, %rsrc, %vindex, %offset, %glc, %slc :
 //     result_type`
 ParseResult MubufStoreOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 8> ops;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> ops;
   Type type;
   if (parser.parseOperandList(ops, 6) || parser.parseColonType(type))
     return failure();

diff  --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 34f264b87b94e..d62192d38edba 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -638,7 +638,7 @@ ParseResult GenericOp::parse(OpAsmParser &parser, OperationState &result) {
         failed(parser.parseOptionalAttrDict(result.attributes)))
       return failure();
 
-  SmallVector<OpAsmParser::OperandType, 8> regionOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> regionOperands;
   std::unique_ptr<Region> region = std::make_unique<Region>();
   SmallVector<Type, 8> operandTypes, regionTypes;
   if (parser.parseRegion(*region, regionOperands, regionTypes))
@@ -1237,7 +1237,7 @@ void linalg::YieldOp::print(OpAsmPrinter &p) {
 }
 
 ParseResult YieldOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 2> opInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> opInfo;
   SmallVector<Type, 2> types;
   SMLoc loc = parser.getCurrentLocation();
   return failure(parser.parseOperandList(opInfo) ||
@@ -1457,7 +1457,8 @@ parseCommonStructuredOpParts(OpAsmParser &parser, OperationState &result,
                              SmallVectorImpl<Type> &inputTypes,
                              SmallVectorImpl<Type> &outputTypes) {
   SMLoc inputsOperandsLoc, outputsOperandsLoc;
-  SmallVector<OpAsmParser::OperandType, 4> inputsOperands, outputsOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> inputsOperands,
+      outputsOperands;
 
   parser.parseOptionalAttrDict(result.attributes);
 

diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 93dd6f052b4dc..7622994cf151c 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -959,14 +959,14 @@ void DmaStartOp::print(OpAsmPrinter &p) {
 //                       memref<1 x i32>
 //
 ParseResult DmaStartOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType srcMemRefInfo;
-  SmallVector<OpAsmParser::OperandType, 4> srcIndexInfos;
-  OpAsmParser::OperandType dstMemRefInfo;
-  SmallVector<OpAsmParser::OperandType, 4> dstIndexInfos;
-  OpAsmParser::OperandType numElementsInfo;
-  OpAsmParser::OperandType tagMemrefInfo;
-  SmallVector<OpAsmParser::OperandType, 4> tagIndexInfos;
-  SmallVector<OpAsmParser::OperandType, 2> strideInfo;
+  OpAsmParser::UnresolvedOperand srcMemRefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> srcIndexInfos;
+  OpAsmParser::UnresolvedOperand dstMemRefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> dstIndexInfos;
+  OpAsmParser::UnresolvedOperand numElementsInfo;
+  OpAsmParser::UnresolvedOperand tagMemrefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> tagIndexInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> strideInfo;
 
   SmallVector<Type, 3> types;
   auto indexType = parser.getBuilder().getIndexType();
@@ -1153,9 +1153,9 @@ LogicalResult GenericAtomicRMWOp::verify() {
 
 ParseResult GenericAtomicRMWOp::parse(OpAsmParser &parser,
                                       OperationState &result) {
-  OpAsmParser::OperandType memref;
+  OpAsmParser::UnresolvedOperand memref;
   Type memrefType;
-  SmallVector<OpAsmParser::OperandType, 4> ivs;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> ivs;
 
   Type indexType = parser.getBuilder().getIndexType();
   if (parser.parseOperand(memref) ||
@@ -1341,8 +1341,8 @@ void PrefetchOp::print(OpAsmPrinter &p) {
 }
 
 ParseResult PrefetchOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType memrefInfo;
-  SmallVector<OpAsmParser::OperandType, 4> indexInfo;
+  OpAsmParser::UnresolvedOperand memrefInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> indexInfo;
   IntegerAttr localityHint;
   MemRefType type;
   StringRef readOrWrite, cacheType;
@@ -2422,7 +2422,7 @@ void TransposeOp::print(OpAsmPrinter &p) {
 }
 
 ParseResult TransposeOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType in;
+  OpAsmParser::UnresolvedOperand in;
   AffineMap permutation;
   MemRefType srcType, dstType;
   if (parser.parseOperand(in) || parser.parseAffineMap(permutation) ||

diff  --git a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
index fe5af72e98e19..e4c881a8376a9 100644
--- a/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+++ b/mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
@@ -54,7 +54,7 @@ static ParseResult parseRegions(OpAsmParser &parser, OperationState &state,
 
 static ParseResult
 parseOperandList(OpAsmParser &parser, StringRef keyword,
-                 SmallVectorImpl<OpAsmParser::OperandType> &args,
+                 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &args,
                  SmallVectorImpl<Type> &argTypes, OperationState &result) {
   if (failed(parser.parseOptionalKeyword(keyword)))
     return success();
@@ -67,7 +67,7 @@ parseOperandList(OpAsmParser &parser, StringRef keyword,
     return success();
 
   do {
-    OpAsmParser::OperandType arg;
+    OpAsmParser::UnresolvedOperand arg;
     Type type;
 
     if (parser.parseRegionArgument(arg) || parser.parseColonType(type))
@@ -97,7 +97,7 @@ static void printOperandList(Operation::operand_range operands,
 }
 
 static ParseResult parseOptionalOperand(OpAsmParser &parser, StringRef keyword,
-                                        OpAsmParser::OperandType &operand,
+                                        OpAsmParser::UnresolvedOperand &operand,
                                         Type type, bool &hasOptional,
                                         OperationState &result) {
   hasOptional = false;
@@ -113,7 +113,7 @@ static ParseResult parseOptionalOperand(OpAsmParser &parser, StringRef keyword,
 
 static ParseResult parseOperandAndType(OpAsmParser &parser,
                                        OperationState &result) {
-  OpAsmParser::OperandType operand;
+  OpAsmParser::UnresolvedOperand operand;
   Type type;
   if (parser.parseOperand(operand) || parser.parseColonType(type) ||
       parser.resolveOperand(operand, type, result.operands))
@@ -128,7 +128,7 @@ static ParseResult parseOperandAndType(OpAsmParser &parser,
 static OptionalParseResult parseOptionalOperandAndType(OpAsmParser &parser,
                                                        StringRef keyword,
                                                        OperationState &result) {
-  OpAsmParser::OperandType operand;
+  OpAsmParser::UnresolvedOperand operand;
   if (succeeded(parser.parseOptionalKeyword(keyword))) {
     return failure(parser.parseLParen() ||
                    parseOperandAndType(parser, result) || parser.parseRParen());
@@ -220,7 +220,7 @@ struct RemoveConstantIfCondition : public OpRewritePattern<OpTy> {
 ///                             region attr-dict?
 ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) {
   Builder &builder = parser.getBuilder();
-  SmallVector<OpAsmParser::OperandType, 8> privateOperands,
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> privateOperands,
       firstprivateOperands, copyOperands, copyinOperands,
       copyinReadonlyOperands, copyoutOperands, copyoutZeroOperands,
       createOperands, createZeroOperands, noCreateOperands, presentOperands,
@@ -233,7 +233,7 @@ ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) {
       firstprivateOperandTypes;
 
   SmallVector<Type, 8> operandTypes;
-  OpAsmParser::OperandType ifCond, selfCond;
+  OpAsmParser::UnresolvedOperand ifCond, selfCond;
   bool hasIfCond = false, hasSelfCond = false;
   OptionalParseResult async, numGangs, numWorkers, vectorLength;
   Type i1Type = builder.getI1Type();
@@ -516,8 +516,9 @@ ParseResult LoopOp::parse(OpAsmParser &parser, OperationState &result) {
   Builder &builder = parser.getBuilder();
   unsigned executionMapping = OpenACCExecMapping::NONE;
   SmallVector<Type, 8> operandTypes;
-  SmallVector<OpAsmParser::OperandType, 8> privateOperands, reductionOperands;
-  SmallVector<OpAsmParser::OperandType, 8> tileOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> privateOperands,
+      reductionOperands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> tileOperands;
   OptionalParseResult gangNum, gangStatic, worker, vector;
 
   // gang?

diff  --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index 602b26cc32bdc..0194132f3a872 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -83,13 +83,13 @@ void ParallelOp::build(OpBuilder &builder, OperationState &state,
 /// ssa-id-and-type ::= ssa-id `:` type
 static ParseResult parseAllocateAndAllocator(
     OpAsmParser &parser,
-    SmallVectorImpl<OpAsmParser::OperandType> &operandsAllocate,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &operandsAllocate,
     SmallVectorImpl<Type> &typesAllocate,
-    SmallVectorImpl<OpAsmParser::OperandType> &operandsAllocator,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &operandsAllocator,
     SmallVectorImpl<Type> &typesAllocator) {
 
   return parser.parseCommaSeparatedList([&]() -> ParseResult {
-    OpAsmParser::OperandType operand;
+    OpAsmParser::UnresolvedOperand operand;
     Type type;
     if (parser.parseOperand(operand) || parser.parseColonType(type))
       return failure();
@@ -177,16 +177,16 @@ LogicalResult ParallelOp::verify() {
 /// linear-val := ssa-id-and-type `=` ssa-id-and-type
 static ParseResult
 parseLinearClause(OpAsmParser &parser,
-                  SmallVectorImpl<OpAsmParser::OperandType> &vars,
+                  SmallVectorImpl<OpAsmParser::UnresolvedOperand> &vars,
                   SmallVectorImpl<Type> &types,
-                  SmallVectorImpl<OpAsmParser::OperandType> &stepVars) {
+                  SmallVectorImpl<OpAsmParser::UnresolvedOperand> &stepVars) {
   if (parser.parseLParen())
     return failure();
 
   do {
-    OpAsmParser::OperandType var;
+    OpAsmParser::UnresolvedOperand var;
     Type type;
-    OpAsmParser::OperandType stepVar;
+    OpAsmParser::UnresolvedOperand stepVar;
     if (parser.parseOperand(var) || parser.parseEqual() ||
         parser.parseOperand(stepVar) || parser.parseColonType(type))
       return failure();
@@ -264,7 +264,7 @@ verifyScheduleModifiers(OpAsmParser &parser,
 static ParseResult
 parseScheduleClause(OpAsmParser &parser, SmallString<8> &schedule,
                     SmallVectorImpl<SmallString<12>> &modifiers,
-                    Optional<OpAsmParser::OperandType> &chunkSize,
+                    Optional<OpAsmParser::UnresolvedOperand> &chunkSize,
                     Type &chunkType) {
   if (parser.parseLParen())
     return failure();
@@ -276,7 +276,7 @@ parseScheduleClause(OpAsmParser &parser, SmallString<8> &schedule,
   schedule = keyword;
   if (keyword == "static" || keyword == "dynamic" || keyword == "guided") {
     if (succeeded(parser.parseOptionalEqual())) {
-      chunkSize = OpAsmParser::OperandType{};
+      chunkSize = OpAsmParser::UnresolvedOperand{};
       if (parser.parseOperand(*chunkSize) || parser.parseColonType(chunkType))
         return failure();
     } else {
@@ -326,9 +326,11 @@ static void printScheduleClause(OpAsmPrinter &p, ClauseScheduleKind sched,
 /// reduction-entry-list ::= reduction-entry
 ///                        | reduction-entry-list `,` reduction-entry
 /// reduction-entry ::= symbol-ref `->` ssa-id `:` type
-static ParseResult parseReductionVarList(
-    OpAsmParser &parser, SmallVectorImpl<OpAsmParser::OperandType> &operands,
-    SmallVectorImpl<Type> &types, ArrayAttr &redcuctionSymbols) {
+static ParseResult
+parseReductionVarList(OpAsmParser &parser,
+                      SmallVectorImpl<OpAsmParser::UnresolvedOperand> &operands,
+                      SmallVectorImpl<Type> &types,
+                      ArrayAttr &redcuctionSymbols) {
   SmallVector<SymbolRefAttr> reductionVec;
   do {
     if (parser.parseAttribute(reductionVec.emplace_back()) ||
@@ -524,20 +526,20 @@ static ParseResult parseClauses(OpAsmParser &parser, OperationState &result,
   StringRef opName = result.name.getStringRef();
 
   // Containers for storing operands, types and attributes for various clauses
-  SmallVector<OpAsmParser::OperandType> allocates, allocators;
+  SmallVector<OpAsmParser::UnresolvedOperand> allocates, allocators;
   SmallVector<Type> allocateTypes, allocatorTypes;
 
   ArrayAttr reductions;
-  SmallVector<OpAsmParser::OperandType> reductionVars;
+  SmallVector<OpAsmParser::UnresolvedOperand> reductionVars;
   SmallVector<Type> reductionVarTypes;
 
-  SmallVector<OpAsmParser::OperandType> linears;
+  SmallVector<OpAsmParser::UnresolvedOperand> linears;
   SmallVector<Type> linearTypes;
-  SmallVector<OpAsmParser::OperandType> linearSteps;
+  SmallVector<OpAsmParser::UnresolvedOperand> linearSteps;
 
   SmallString<8> schedule;
   SmallVector<SmallString<12>> modifiers;
-  Optional<OpAsmParser::OperandType> scheduleChunkSize;
+  Optional<OpAsmParser::UnresolvedOperand> scheduleChunkSize;
   Type scheduleChunkType;
 
   // Compute the position of clauses in operand segments
@@ -746,7 +748,7 @@ LogicalResult SectionsOp::verifyRegions() {
 ///          | reduction
 ParseResult WsLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   // Parse an opening `(` followed by induction variables followed by `)`
-  SmallVector<OpAsmParser::OperandType> ivs;
+  SmallVector<OpAsmParser::UnresolvedOperand> ivs;
   if (parser.parseRegionArgumentList(ivs, /*requiredOperandCount=*/-1,
                                      OpAsmParser::Delimiter::Paren))
     return failure();
@@ -757,13 +759,13 @@ ParseResult WsLoopOp::parse(OpAsmParser &parser, OperationState &result) {
     return failure();
 
   // Parse loop bounds.
-  SmallVector<OpAsmParser::OperandType> lower;
+  SmallVector<OpAsmParser::UnresolvedOperand> lower;
   if (parser.parseEqual() ||
       parser.parseOperandList(lower, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(lower, loopVarType, result.operands))
     return failure();
 
-  SmallVector<OpAsmParser::OperandType> upper;
+  SmallVector<OpAsmParser::UnresolvedOperand> upper;
   if (parser.parseKeyword("to") ||
       parser.parseOperandList(upper, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(upper, loopVarType, result.operands))
@@ -775,7 +777,7 @@ ParseResult WsLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   }
 
   // Parse step values.
-  SmallVector<OpAsmParser::OperandType> steps;
+  SmallVector<OpAsmParser::UnresolvedOperand> steps;
   if (parser.parseKeyword("step") ||
       parser.parseOperandList(steps, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(steps, loopVarType, result.operands))
@@ -794,7 +796,7 @@ ParseResult WsLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   // Now parse the body.
   Region *body = result.addRegion();
   SmallVector<Type> ivTypes(numIVs, loopVarType);
-  SmallVector<OpAsmParser::OperandType> blockArgs(ivs);
+  SmallVector<OpAsmParser::UnresolvedOperand> blockArgs(ivs);
   if (parser.parseRegion(*body, blockArgs, ivTypes))
     return failure();
   return success();
@@ -851,7 +853,7 @@ void WsLoopOp::print(OpAsmPrinter &p) {
 /// clause ::= TODO
 ParseResult SimdLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   // Parse an opening `(` followed by induction variables followed by `)`
-  SmallVector<OpAsmParser::OperandType> ivs;
+  SmallVector<OpAsmParser::UnresolvedOperand> ivs;
   if (parser.parseRegionArgumentList(ivs, /*requiredOperandCount=*/-1,
                                      OpAsmParser::Delimiter::Paren))
     return failure();
@@ -860,19 +862,19 @@ ParseResult SimdLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   if (parser.parseColonType(loopVarType))
     return failure();
   // Parse loop bounds.
-  SmallVector<OpAsmParser::OperandType> lower;
+  SmallVector<OpAsmParser::UnresolvedOperand> lower;
   if (parser.parseEqual() ||
       parser.parseOperandList(lower, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(lower, loopVarType, result.operands))
     return failure();
-  SmallVector<OpAsmParser::OperandType> upper;
+  SmallVector<OpAsmParser::UnresolvedOperand> upper;
   if (parser.parseKeyword("to") ||
       parser.parseOperandList(upper, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(upper, loopVarType, result.operands))
     return failure();
 
   // Parse step values.
-  SmallVector<OpAsmParser::OperandType> steps;
+  SmallVector<OpAsmParser::UnresolvedOperand> steps;
   if (parser.parseKeyword("step") ||
       parser.parseOperandList(steps, numIVs, OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(steps, loopVarType, result.operands))
@@ -886,7 +888,7 @@ ParseResult SimdLoopOp::parse(OpAsmParser &parser, OperationState &result) {
   // Now parse the body.
   Region *body = result.addRegion();
   SmallVector<Type> ivTypes(numIVs, loopVarType);
-  SmallVector<OpAsmParser::OperandType> blockArgs(ivs);
+  SmallVector<OpAsmParser::UnresolvedOperand> blockArgs(ivs);
   if (parser.parseRegion(*body, blockArgs, ivTypes))
     return failure();
   return success();

diff  --git a/mlir/lib/Dialect/PDL/IR/PDL.cpp b/mlir/lib/Dialect/PDL/IR/PDL.cpp
index 3a0280c797abc..1d22cf5395b1d 100644
--- a/mlir/lib/Dialect/PDL/IR/PDL.cpp
+++ b/mlir/lib/Dialect/PDL/IR/PDL.cpp
@@ -142,14 +142,15 @@ LogicalResult OperandsOp::verify() { return verifyHasBindingUse(*this); }
 //===----------------------------------------------------------------------===//
 
 static ParseResult parseOperationOpAttributes(
-    OpAsmParser &p, SmallVectorImpl<OpAsmParser::OperandType> &attrOperands,
+    OpAsmParser &p,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &attrOperands,
     ArrayAttr &attrNamesAttr) {
   Builder &builder = p.getBuilder();
   SmallVector<Attribute, 4> attrNames;
   if (succeeded(p.parseOptionalLBrace())) {
     do {
       StringAttr nameAttr;
-      OpAsmParser::OperandType operand;
+      OpAsmParser::UnresolvedOperand operand;
       if (p.parseAttribute(nameAttr) || p.parseEqual() ||
           p.parseOperand(operand))
         return failure();

diff  --git a/mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp b/mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
index 9b740e5744723..a5415e59dbb63 100644
--- a/mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
+++ b/mlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
@@ -48,14 +48,15 @@ static LogicalResult verifySwitchOp(OpT op) {
 //===----------------------------------------------------------------------===//
 
 static ParseResult parseCreateOperationOpAttributes(
-    OpAsmParser &p, SmallVectorImpl<OpAsmParser::OperandType> &attrOperands,
+    OpAsmParser &p,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &attrOperands,
     ArrayAttr &attrNamesAttr) {
   Builder &builder = p.getBuilder();
   SmallVector<Attribute, 4> attrNames;
   if (succeeded(p.parseOptionalLBrace())) {
     do {
       StringAttr nameAttr;
-      OpAsmParser::OperandType operand;
+      OpAsmParser::UnresolvedOperand operand;
       if (p.parseAttribute(nameAttr) || p.parseEqual() ||
           p.parseOperand(operand))
         return failure();
@@ -100,7 +101,7 @@ void ForEachOp::build(::mlir::OpBuilder &builder, ::mlir::OperationState &state,
 
 ParseResult ForEachOp::parse(OpAsmParser &parser, OperationState &result) {
   // Parse the loop variable followed by type.
-  OpAsmParser::OperandType loopVariable;
+  OpAsmParser::UnresolvedOperand loopVariable;
   Type loopVariableType;
   if (parser.parseRegionArgument(loopVariable) ||
       parser.parseColonType(loopVariableType))
@@ -111,7 +112,7 @@ ParseResult ForEachOp::parse(OpAsmParser &parser, OperationState &result) {
     return failure();
 
   // Parse the operand (value range).
-  OpAsmParser::OperandType operandInfo;
+  OpAsmParser::UnresolvedOperand operandInfo;
   if (parser.parseOperand(operandInfo))
     return failure();
 

diff  --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index 114d93bf445bf..8410f897c3daf 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -393,7 +393,7 @@ void ForOp::print(OpAsmPrinter &p) {
 
 ParseResult ForOp::parse(OpAsmParser &parser, OperationState &result) {
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType inductionVariable, lb, ub, step;
+  OpAsmParser::UnresolvedOperand inductionVariable, lb, ub, step;
   // Parse the induction variable followed by '='.
   if (parser.parseRegionArgument(inductionVariable) || parser.parseEqual())
     return failure();
@@ -409,7 +409,7 @@ ParseResult ForOp::parse(OpAsmParser &parser, OperationState &result) {
     return failure();
 
   // Parse the optional initial iteration arguments.
-  SmallVector<OpAsmParser::OperandType, 4> regionArgs, operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> regionArgs, operands;
   SmallVector<Type, 4> argTypes;
   regionArgs.push_back(inductionVariable);
 
@@ -1125,7 +1125,7 @@ ParseResult IfOp::parse(OpAsmParser &parser, OperationState &result) {
   Region *elseRegion = result.addRegion();
 
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType cond;
+  OpAsmParser::UnresolvedOperand cond;
   Type i1Type = builder.getIntegerType(1);
   if (parser.parseOperand(cond) ||
       parser.resolveOperand(cond, i1Type, result.operands))
@@ -1979,20 +1979,20 @@ LogicalResult ParallelOp::verify() {
 ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) {
   auto &builder = parser.getBuilder();
   // Parse an opening `(` followed by induction variables followed by `)`
-  SmallVector<OpAsmParser::OperandType, 4> ivs;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> ivs;
   if (parser.parseRegionArgumentList(ivs, /*requiredOperandCount=*/-1,
                                      OpAsmParser::Delimiter::Paren))
     return failure();
 
   // Parse loop bounds.
-  SmallVector<OpAsmParser::OperandType, 4> lower;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> lower;
   if (parser.parseEqual() ||
       parser.parseOperandList(lower, ivs.size(),
                               OpAsmParser::Delimiter::Paren) ||
       parser.resolveOperands(lower, builder.getIndexType(), result.operands))
     return failure();
 
-  SmallVector<OpAsmParser::OperandType, 4> upper;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> upper;
   if (parser.parseKeyword("to") ||
       parser.parseOperandList(upper, ivs.size(),
                               OpAsmParser::Delimiter::Paren) ||
@@ -2000,7 +2000,7 @@ ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) {
     return failure();
 
   // Parse step values.
-  SmallVector<OpAsmParser::OperandType, 4> steps;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> steps;
   if (parser.parseKeyword("step") ||
       parser.parseOperandList(steps, ivs.size(),
                               OpAsmParser::Delimiter::Paren) ||
@@ -2008,7 +2008,7 @@ ParseResult ParallelOp::parse(OpAsmParser &parser, OperationState &result) {
     return failure();
 
   // Parse init values.
-  SmallVector<OpAsmParser::OperandType, 4> initVals;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> initVals;
   if (succeeded(parser.parseOptionalKeyword("init"))) {
     if (parser.parseOperandList(initVals, /*requiredOperandCount=*/-1,
                                 OpAsmParser::Delimiter::Paren))
@@ -2290,7 +2290,7 @@ LogicalResult ReduceOp::verifyRegions() {
 
 ParseResult ReduceOp::parse(OpAsmParser &parser, OperationState &result) {
   // Parse an opening `(` followed by the reduced value followed by `)`
-  OpAsmParser::OperandType operand;
+  OpAsmParser::UnresolvedOperand operand;
   if (parser.parseLParen() || parser.parseOperand(operand) ||
       parser.parseRParen())
     return failure();
@@ -2385,7 +2385,7 @@ void WhileOp::getSuccessorRegions(Optional<unsigned> index,
 /// assignment-list ::= assignment | assignment `,` assignment-list
 /// assignment ::= ssa-value `=` ssa-value
 ParseResult scf::WhileOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 4> regionArgs, operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> regionArgs, operands;
   Region *before = result.addRegion();
   Region *after = result.addRegion();
 

diff  --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
index fae7a69d5228a..4ffde49807e83 100644
--- a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
+++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
@@ -66,7 +66,7 @@ static constexpr const char kCompositeSpecConstituentsName[] = "constituents";
 
 static ParseResult parseOneResultSameOperandTypeOp(OpAsmParser &parser,
                                                    OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 2> ops;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> ops;
   Type type;
   // If the operand list is in-between parentheses, then we have a generic form.
   // (see the fallback in `printOneResultOp`).
@@ -766,8 +766,8 @@ static ParseResult parseAtomicUpdateOp(OpAsmParser &parser,
                                        OperationState &state, bool hasValue) {
   spirv::Scope scope;
   spirv::MemorySemantics memoryScope;
-  SmallVector<OpAsmParser::OperandType, 2> operandInfo;
-  OpAsmParser::OperandType ptrInfo, valueInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandInfo;
+  OpAsmParser::UnresolvedOperand ptrInfo, valueInfo;
   Type type;
   SMLoc loc;
   if (parseEnumStrAttr(scope, parser, state, kMemoryScopeAttrName) ||
@@ -846,7 +846,7 @@ static ParseResult parseGroupNonUniformArithmeticOp(OpAsmParser &parser,
                                                     OperationState &state) {
   spirv::Scope executionScope;
   spirv::GroupOperation groupOperation;
-  OpAsmParser::OperandType valueInfo;
+  OpAsmParser::UnresolvedOperand valueInfo;
   if (parseEnumStrAttr(executionScope, parser, state,
                        kExecutionScopeAttrName) ||
       parseEnumStrAttr(groupOperation, parser, state,
@@ -854,9 +854,9 @@ static ParseResult parseGroupNonUniformArithmeticOp(OpAsmParser &parser,
       parser.parseOperand(valueInfo))
     return failure();
 
-  Optional<OpAsmParser::OperandType> clusterSizeInfo;
+  Optional<OpAsmParser::UnresolvedOperand> clusterSizeInfo;
   if (succeeded(parser.parseOptionalKeyword(kClusterSize))) {
-    clusterSizeInfo = OpAsmParser::OperandType();
+    clusterSizeInfo = OpAsmParser::UnresolvedOperand();
     if (parser.parseLParen() || parser.parseOperand(*clusterSizeInfo) ||
         parser.parseRParen())
       return failure();
@@ -1029,8 +1029,8 @@ void spirv::AccessChainOp::build(OpBuilder &builder, OperationState &state,
 
 ParseResult spirv::AccessChainOp::parse(OpAsmParser &parser,
                                         OperationState &state) {
-  OpAsmParser::OperandType ptrInfo;
-  SmallVector<OpAsmParser::OperandType, 4> indicesInfo;
+  OpAsmParser::UnresolvedOperand ptrInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> indicesInfo;
   Type type;
   auto loc = parser.getCurrentLocation();
   SmallVector<Type, 4> indicesTypes;
@@ -1143,7 +1143,7 @@ static ParseResult parseAtomicCompareExchangeImpl(OpAsmParser &parser,
                                                   OperationState &state) {
   spirv::Scope memoryScope;
   spirv::MemorySemantics equalSemantics, unequalSemantics;
-  SmallVector<OpAsmParser::OperandType, 3> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> operandInfo;
   Type type;
   if (parseEnumStrAttr(memoryScope, parser, state, kMemoryScopeAttrName) ||
       parseEnumStrAttr(equalSemantics, parser, state,
@@ -1265,7 +1265,7 @@ ParseResult spirv::AtomicExchangeOp::parse(OpAsmParser &parser,
                                            OperationState &state) {
   spirv::Scope memoryScope;
   spirv::MemorySemantics semantics;
-  SmallVector<OpAsmParser::OperandType, 2> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandInfo;
   Type type;
   if (parseEnumStrAttr(memoryScope, parser, state, kMemoryScopeAttrName) ||
       parseEnumStrAttr(semantics, parser, state, kSemanticsAttrName) ||
@@ -1535,7 +1535,7 @@ spirv::BranchConditionalOp::getMutableSuccessorOperands(unsigned index) {
 ParseResult spirv::BranchConditionalOp::parse(OpAsmParser &parser,
                                               OperationState &state) {
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType condInfo;
+  OpAsmParser::UnresolvedOperand condInfo;
   Block *dest;
 
   // Parse the condition.
@@ -1620,7 +1620,7 @@ LogicalResult spirv::BranchConditionalOp::verify() {
 
 ParseResult spirv::CompositeConstructOp::parse(OpAsmParser &parser,
                                                OperationState &state) {
-  SmallVector<OpAsmParser::OperandType, 4> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> operands;
   Type type;
   auto loc = parser.getCurrentLocation();
 
@@ -1699,7 +1699,7 @@ void spirv::CompositeExtractOp::build(OpBuilder &builder, OperationState &state,
 
 ParseResult spirv::CompositeExtractOp::parse(OpAsmParser &parser,
                                              OperationState &state) {
-  OpAsmParser::OperandType compositeInfo;
+  OpAsmParser::UnresolvedOperand compositeInfo;
   Attribute indicesAttr;
   Type compositeType;
   SMLoc attrLocation;
@@ -1753,7 +1753,7 @@ void spirv::CompositeInsertOp::build(OpBuilder &builder, OperationState &state,
 
 ParseResult spirv::CompositeInsertOp::parse(OpAsmParser &parser,
                                             OperationState &state) {
-  SmallVector<OpAsmParser::OperandType, 2> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operands;
   Type objectType, compositeType;
   Attribute indicesAttr;
   auto loc = parser.getCurrentLocation();
@@ -2071,7 +2071,7 @@ void spirv::EntryPointOp::build(OpBuilder &builder, OperationState &state,
 ParseResult spirv::EntryPointOp::parse(OpAsmParser &parser,
                                        OperationState &state) {
   spirv::ExecutionModel execModel;
-  SmallVector<OpAsmParser::OperandType, 0> identifiers;
+  SmallVector<OpAsmParser::UnresolvedOperand, 0> identifiers;
   SmallVector<Type, 0> idTypes;
   SmallVector<Attribute, 4> interfaceVars;
 
@@ -2194,7 +2194,7 @@ LogicalResult spirv::UConvertOp::verify() {
 //===----------------------------------------------------------------------===//
 
 ParseResult spirv::FuncOp::parse(OpAsmParser &parser, OperationState &state) {
-  SmallVector<OpAsmParser::OperandType> entryArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand> entryArgs;
   SmallVector<NamedAttrList> argAttrs;
   SmallVector<NamedAttrList> resultAttrs;
   SmallVector<Type> argTypes;
@@ -2601,7 +2601,7 @@ ParseResult spirv::SubgroupBlockReadINTELOp::parse(OpAsmParser &parser,
                                                    OperationState &state) {
   // Parse the storage class specification
   spirv::StorageClass storageClass;
-  OpAsmParser::OperandType ptrInfo;
+  OpAsmParser::UnresolvedOperand ptrInfo;
   Type elementType;
   if (parseEnumStrAttr(storageClass, parser) || parser.parseOperand(ptrInfo) ||
       parser.parseColon() || parser.parseType(elementType)) {
@@ -2639,7 +2639,7 @@ ParseResult spirv::SubgroupBlockWriteINTELOp::parse(OpAsmParser &parser,
                                                     OperationState &state) {
   // Parse the storage class specification
   spirv::StorageClass storageClass;
-  SmallVector<OpAsmParser::OperandType, 2> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandInfo;
   auto loc = parser.getCurrentLocation();
   Type elementType;
   if (parseEnumStrAttr(storageClass, parser) ||
@@ -2857,7 +2857,7 @@ void spirv::LoadOp::build(OpBuilder &builder, OperationState &state,
 ParseResult spirv::LoadOp::parse(OpAsmParser &parser, OperationState &state) {
   // Parse the storage class specification
   spirv::StorageClass storageClass;
-  OpAsmParser::OperandType ptrInfo;
+  OpAsmParser::UnresolvedOperand ptrInfo;
   Type elementType;
   if (parseEnumStrAttr(storageClass, parser) || parser.parseOperand(ptrInfo) ||
       parseMemoryAccessAttributes(parser, state) ||
@@ -3477,7 +3477,7 @@ LogicalResult spirv::SpecConstantOp::verify() {
 ParseResult spirv::StoreOp::parse(OpAsmParser &parser, OperationState &state) {
   // Parse the storage class specification
   spirv::StorageClass storageClass;
-  SmallVector<OpAsmParser::OperandType, 2> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandInfo;
   auto loc = parser.getCurrentLocation();
   Type elementType;
   if (parseEnumStrAttr(storageClass, parser) ||
@@ -3541,9 +3541,9 @@ LogicalResult spirv::UnreachableOp::verify() {
 ParseResult spirv::VariableOp::parse(OpAsmParser &parser,
                                      OperationState &state) {
   // Parse optional initializer
-  Optional<OpAsmParser::OperandType> initInfo;
+  Optional<OpAsmParser::UnresolvedOperand> initInfo;
   if (succeeded(parser.parseOptionalKeyword("init"))) {
-    initInfo = OpAsmParser::OperandType();
+    initInfo = OpAsmParser::UnresolvedOperand();
     if (parser.parseLParen() || parser.parseOperand(*initInfo) ||
         parser.parseRParen())
       return failure();
@@ -3670,7 +3670,7 @@ LogicalResult spirv::VectorShuffleOp::verify() {
 
 ParseResult spirv::CooperativeMatrixLoadNVOp::parse(OpAsmParser &parser,
                                                     OperationState &state) {
-  SmallVector<OpAsmParser::OperandType, 3> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> operandInfo;
   Type strideType = parser.getBuilder().getIntegerType(32);
   Type columnMajorType = parser.getBuilder().getIntegerType(1);
   Type ptrType;
@@ -3728,7 +3728,7 @@ LogicalResult spirv::CooperativeMatrixLoadNVOp::verify() {
 
 ParseResult spirv::CooperativeMatrixStoreNVOp::parse(OpAsmParser &parser,
                                                      OperationState &state) {
-  SmallVector<OpAsmParser::OperandType, 4> operandInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> operandInfo;
   Type strideType = parser.getBuilder().getIntegerType(32);
   Type columnMajorType = parser.getBuilder().getIntegerType(1);
   Type ptrType;
@@ -3859,10 +3859,10 @@ void spirv::CopyMemoryOp::print(OpAsmPrinter &printer) {
 ParseResult spirv::CopyMemoryOp::parse(OpAsmParser &parser,
                                        OperationState &state) {
   spirv::StorageClass targetStorageClass;
-  OpAsmParser::OperandType targetPtrInfo;
+  OpAsmParser::UnresolvedOperand targetPtrInfo;
 
   spirv::StorageClass sourceStorageClass;
-  OpAsmParser::OperandType sourcePtrInfo;
+  OpAsmParser::UnresolvedOperand sourcePtrInfo;
 
   Type elementType;
 
@@ -4325,8 +4325,8 @@ LogicalResult spirv::ImageQuerySizeOp::verify() {
 static ParseResult parsePtrAccessChainOpImpl(StringRef opName,
                                              OpAsmParser &parser,
                                              OperationState &state) {
-  OpAsmParser::OperandType ptrInfo;
-  SmallVector<OpAsmParser::OperandType, 4> indicesInfo;
+  OpAsmParser::UnresolvedOperand ptrInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> indicesInfo;
   Type type;
   auto loc = parser.getCurrentLocation();
   SmallVector<Type, 4> indicesTypes;

diff  --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index 4a2108107a329..32be1db32ffa0 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -257,7 +257,7 @@ ParseResult AssumingOp::parse(OpAsmParser &parser, OperationState &result) {
   Region *doRegion = result.addRegion();
 
   auto &builder = parser.getBuilder();
-  OpAsmParser::OperandType cond;
+  OpAsmParser::UnresolvedOperand cond;
   if (parser.parseOperand(cond) ||
       parser.resolveOperand(cond, builder.getType<WitnessType>(),
                             result.operands))
@@ -1832,7 +1832,7 @@ LogicalResult ReduceOp::verify() {
 
 ParseResult ReduceOp::parse(OpAsmParser &parser, OperationState &result) {
   // Parse operands.
-  SmallVector<OpAsmParser::OperandType, 3> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> operands;
   Type shapeOrExtentTensorType;
   if (parser.parseOperandList(operands, /*requiredOperandCount=*/-1,
                               OpAsmParser::Delimiter::Paren) ||

diff  --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index b95a214034076..1c8065ec88095 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -1734,7 +1734,7 @@ void printInferType(OpAsmPrinter &printer, Operation *op, Value optOperand,
                     Type typeToInfer, Type typeToInferFrom) {}
 
 ParseResult parseInferType(OpAsmParser &parser,
-                           Optional<OpAsmParser::OperandType> optOperand,
+                           Optional<OpAsmParser::UnresolvedOperand> optOperand,
                            Type &typeToInfer, Type typeToInferFrom) {
   if (optOperand)
     typeToInfer = typeToInferFrom;

diff  --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index fd6fea25b4e0f..da52e1b580efe 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -416,7 +416,7 @@ LogicalResult ReductionOp::verify() {
 }
 
 ParseResult ReductionOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 2> operandsInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandsInfo;
   Type redType;
   Type resType;
   CombiningKindAttr kindAttr;
@@ -526,10 +526,10 @@ void vector::ContractionOp::build(OpBuilder &builder, OperationState &result,
 }
 
 ParseResult ContractionOp::parse(OpAsmParser &parser, OperationState &result) {
-  OpAsmParser::OperandType lhsInfo;
-  OpAsmParser::OperandType rhsInfo;
-  OpAsmParser::OperandType accInfo;
-  SmallVector<OpAsmParser::OperandType, 2> masksInfo;
+  OpAsmParser::UnresolvedOperand lhsInfo;
+  OpAsmParser::UnresolvedOperand rhsInfo;
+  OpAsmParser::UnresolvedOperand accInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> masksInfo;
   SmallVector<Type, 2> types;
   Type resultType;
   auto loc = parser.getCurrentLocation();
@@ -2097,7 +2097,7 @@ void OuterProductOp::print(OpAsmPrinter &p) {
 }
 
 ParseResult OuterProductOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 3> operandsInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 3> operandsInfo;
   Type tLHS, tRHS;
   if (parser.parseOperandList(operandsInfo) ||
       parser.parseOptionalAttrDict(result.attributes) ||
@@ -2736,11 +2736,11 @@ void TransferReadOp::print(OpAsmPrinter &p) {
 ParseResult TransferReadOp::parse(OpAsmParser &parser, OperationState &result) {
   auto &builder = parser.getBuilder();
   SMLoc typesLoc;
-  OpAsmParser::OperandType sourceInfo;
-  SmallVector<OpAsmParser::OperandType, 8> indexInfo;
-  OpAsmParser::OperandType paddingInfo;
+  OpAsmParser::UnresolvedOperand sourceInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> indexInfo;
+  OpAsmParser::UnresolvedOperand paddingInfo;
   SmallVector<Type, 2> types;
-  OpAsmParser::OperandType maskInfo;
+  OpAsmParser::UnresolvedOperand maskInfo;
   // Parsing with support for paddingValue.
   if (parser.parseOperand(sourceInfo) ||
       parser.parseOperandList(indexInfo, OpAsmParser::Delimiter::Square) ||
@@ -3115,10 +3115,10 @@ ParseResult TransferWriteOp::parse(OpAsmParser &parser,
                                    OperationState &result) {
   auto &builder = parser.getBuilder();
   SMLoc typesLoc;
-  OpAsmParser::OperandType vectorInfo, sourceInfo;
-  SmallVector<OpAsmParser::OperandType, 8> indexInfo;
+  OpAsmParser::UnresolvedOperand vectorInfo, sourceInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 8> indexInfo;
   SmallVector<Type, 2> types;
-  OpAsmParser::OperandType maskInfo;
+  OpAsmParser::UnresolvedOperand maskInfo;
   if (parser.parseOperand(vectorInfo) || parser.parseComma() ||
       parser.parseOperand(sourceInfo) ||
       parser.parseOperandList(indexInfo, OpAsmParser::Delimiter::Square))

diff  --git a/mlir/lib/IR/FunctionImplementation.cpp b/mlir/lib/IR/FunctionImplementation.cpp
index 0da923d81655c..2725d48125244 100644
--- a/mlir/lib/IR/FunctionImplementation.cpp
+++ b/mlir/lib/IR/FunctionImplementation.cpp
@@ -15,7 +15,7 @@ using namespace mlir;
 
 ParseResult mlir::function_interface_impl::parseFunctionArgumentList(
     OpAsmParser &parser, bool allowAttributes, bool allowVariadic,
-    SmallVectorImpl<OpAsmParser::OperandType> &argNames,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &argNames,
     SmallVectorImpl<Type> &argTypes, SmallVectorImpl<NamedAttrList> &argAttrs,
     SmallVectorImpl<Location> &argLocations, bool &isVariadic) {
   if (parser.parseLParen())
@@ -28,7 +28,7 @@ ParseResult mlir::function_interface_impl::parseFunctionArgumentList(
     SMLoc loc = parser.getCurrentLocation();
 
     // Parse argument name if present.
-    OpAsmParser::OperandType argument;
+    OpAsmParser::UnresolvedOperand argument;
     Type argumentType;
     if (succeeded(parser.parseOptionalRegionArgument(argument)) &&
         !argument.name.empty()) {
@@ -133,7 +133,7 @@ parseFunctionResultList(OpAsmParser &parser, SmallVectorImpl<Type> &resultTypes,
 
 ParseResult mlir::function_interface_impl::parseFunctionSignature(
     OpAsmParser &parser, bool allowVariadic,
-    SmallVectorImpl<OpAsmParser::OperandType> &argNames,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &argNames,
     SmallVectorImpl<Type> &argTypes, SmallVectorImpl<NamedAttrList> &argAttrs,
     SmallVectorImpl<Location> &argLocations, bool &isVariadic,
     SmallVectorImpl<Type> &resultTypes,
@@ -194,7 +194,7 @@ void mlir::function_interface_impl::addArgAndResultAttrs(
 ParseResult mlir::function_interface_impl::parseFunctionOp(
     OpAsmParser &parser, OperationState &result, bool allowVariadic,
     FuncTypeBuilder funcTypeBuilder) {
-  SmallVector<OpAsmParser::OperandType> entryArgs;
+  SmallVector<OpAsmParser::UnresolvedOperand> entryArgs;
   SmallVector<NamedAttrList> argAttrs;
   SmallVector<NamedAttrList> resultAttrs;
   SmallVector<Type> argTypes;

diff  --git a/mlir/lib/Interfaces/ViewLikeInterface.cpp b/mlir/lib/Interfaces/ViewLikeInterface.cpp
index 0e772efd17ce9..6f575cf87e969 100644
--- a/mlir/lib/Interfaces/ViewLikeInterface.cpp
+++ b/mlir/lib/Interfaces/ViewLikeInterface.cpp
@@ -105,10 +105,10 @@ void mlir::printOperandsOrIntegersSizesList(OpAsmPrinter &p, Operation *op,
 }
 
 template <int64_t dynVal>
-static ParseResult
-parseOperandsOrIntegersImpl(OpAsmParser &parser,
-                            SmallVectorImpl<OpAsmParser::OperandType> &values,
-                            ArrayAttr &integers) {
+static ParseResult parseOperandsOrIntegersImpl(
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
+    ArrayAttr &integers) {
   if (failed(parser.parseLSquare()))
     return failure();
   // 0-D.
@@ -119,7 +119,7 @@ parseOperandsOrIntegersImpl(OpAsmParser &parser,
 
   SmallVector<int64_t, 4> attrVals;
   while (true) {
-    OpAsmParser::OperandType operand;
+    OpAsmParser::UnresolvedOperand operand;
     auto res = parser.parseOptionalOperand(operand);
     if (res.hasValue() && succeeded(res.getValue())) {
       values.push_back(operand);
@@ -143,14 +143,16 @@ parseOperandsOrIntegersImpl(OpAsmParser &parser,
 }
 
 ParseResult mlir::parseOperandsOrIntegersOffsetsOrStridesList(
-    OpAsmParser &parser, SmallVectorImpl<OpAsmParser::OperandType> &values,
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
     ArrayAttr &integers) {
   return parseOperandsOrIntegersImpl<ShapedType::kDynamicStrideOrOffset>(
       parser, values, integers);
 }
 
 ParseResult mlir::parseOperandsOrIntegersSizesList(
-    OpAsmParser &parser, SmallVectorImpl<OpAsmParser::OperandType> &values,
+    OpAsmParser &parser,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
     ArrayAttr &integers) {
   return parseOperandsOrIntegersImpl<ShapedType::kDynamicSize>(parser, values,
                                                                integers);

diff  --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index c750275014d7f..178926c48cfa2 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -334,7 +334,7 @@ class OperationParser : public Parser {
   using OpOrArgument = llvm::PointerUnion<Operation *, BlockArgument>;
 
   /// Parse an optional trailing location and add it to the specifier Operation
-  /// or `OperandType` if present.
+  /// or `UnresolvedOperand` if present.
   ///
   ///   trailing-location ::= (`loc` (`(` location `)` | attribute-alias))?
   ///
@@ -1216,29 +1216,30 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   ParseResult parseGenericOperationAfterOpName(
       OperationState &result,
-      Optional<ArrayRef<OperandType>> parsedOperandTypes,
+      Optional<ArrayRef<UnresolvedOperand>> parsedUnresolvedOperands,
       Optional<ArrayRef<Block *>> parsedSuccessors,
       Optional<MutableArrayRef<std::unique_ptr<Region>>> parsedRegions,
       Optional<ArrayRef<NamedAttribute>> parsedAttributes,
       Optional<FunctionType> parsedFnType) final {
 
-    // TODO: The types, OperandType and SSAUseInfo, both share the same members
-    // but in 
diff erent order. It would be cleaner to make one alias of the
-    // other, making the following code redundant.
+    // TODO: The types, UnresolvedOperand and SSAUseInfo, both share the same
+    // members but in 
diff erent order. It would be cleaner to make one alias of
+    // the other, making the following code redundant.
     SmallVector<OperationParser::SSAUseInfo> parsedOperandUseInfo;
-    if (parsedOperandTypes) {
-      for (const OperandType &parsedOperandType : *parsedOperandTypes)
+    if (parsedUnresolvedOperands) {
+      for (const UnresolvedOperand &parsedUnresolvedOperand :
+           *parsedUnresolvedOperands)
         parsedOperandUseInfo.push_back({
-            parsedOperandType.name,
-            parsedOperandType.number,
-            parsedOperandType.location,
+            parsedUnresolvedOperand.name,
+            parsedUnresolvedOperand.number,
+            parsedUnresolvedOperand.location,
         });
     }
 
     return parser.parseGenericOperationAfterOpName(
         result,
-        parsedOperandTypes ? llvm::makeArrayRef(parsedOperandUseInfo)
-                           : llvm::None,
+        parsedUnresolvedOperands ? llvm::makeArrayRef(parsedOperandUseInfo)
+                                 : llvm::None,
         parsedSuccessors, parsedRegions, parsedAttributes, parsedFnType);
   }
   //===--------------------------------------------------------------------===//
@@ -1290,7 +1291,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   //===--------------------------------------------------------------------===//
 
   /// Parse a single operand.
-  ParseResult parseOperand(OperandType &result) override {
+  ParseResult parseOperand(UnresolvedOperand &result) override {
     OperationParser::SSAUseInfo useInfo;
     if (parser.parseSSAUse(useInfo))
       return failure();
@@ -1300,7 +1301,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   }
 
   /// Parse a single operand if present.
-  OptionalParseResult parseOptionalOperand(OperandType &result) override {
+  OptionalParseResult parseOptionalOperand(UnresolvedOperand &result) override {
     if (parser.getToken().is(Token::percent_identifier))
       return parseOperand(result);
     return llvm::None;
@@ -1308,7 +1309,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parse zero or more SSA comma-separated operand references with a specified
   /// surrounding delimiter, and an optional required operand count.
-  ParseResult parseOperandList(SmallVectorImpl<OperandType> &result,
+  ParseResult parseOperandList(SmallVectorImpl<UnresolvedOperand> &result,
                                int requiredOperandCount = -1,
                                Delimiter delimiter = Delimiter::None) override {
     return parseOperandOrRegionArgList(result, /*isOperandList=*/true,
@@ -1318,7 +1319,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   /// Parse zero or more SSA comma-separated operand or region arguments with
   ///  optional surrounding delimiter and required operand count.
   ParseResult
-  parseOperandOrRegionArgList(SmallVectorImpl<OperandType> &result,
+  parseOperandOrRegionArgList(SmallVectorImpl<UnresolvedOperand> &result,
                               bool isOperandList, int requiredOperandCount = -1,
                               Delimiter delimiter = Delimiter::None) {
     auto startLoc = parser.getToken().getLoc();
@@ -1342,7 +1343,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
     }
 
     auto parseOneOperand = [&]() -> ParseResult {
-      OperandType operandOrArg;
+      UnresolvedOperand operandOrArg;
       if (isOperandList ? parseOperand(operandOrArg)
                         : parseRegionArgument(operandOrArg))
         return failure();
@@ -1364,9 +1365,10 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   /// Parse zero or more trailing SSA comma-separated trailing operand
   /// references with a specified surrounding delimiter, and an optional
   /// required operand count. A leading comma is expected before the operands.
-  ParseResult parseTrailingOperandList(SmallVectorImpl<OperandType> &result,
-                                       int requiredOperandCount,
-                                       Delimiter delimiter) override {
+  ParseResult
+  parseTrailingOperandList(SmallVectorImpl<UnresolvedOperand> &result,
+                           int requiredOperandCount,
+                           Delimiter delimiter) override {
     if (parser.getToken().is(Token::comma)) {
       parseComma();
       return parseOperandList(result, requiredOperandCount, delimiter);
@@ -1378,7 +1380,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   }
 
   /// Resolve an operand to an SSA value, emitting an error on failure.
-  ParseResult resolveOperand(const OperandType &operand, Type type,
+  ParseResult resolveOperand(const UnresolvedOperand &operand, Type type,
                              SmallVectorImpl<Value> &result) override {
     OperationParser::SSAUseInfo operandInfo = {operand.name, operand.number,
                                                operand.location};
@@ -1390,15 +1392,15 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   }
 
   /// Parse an AffineMap of SSA ids.
-  ParseResult parseAffineMapOfSSAIds(SmallVectorImpl<OperandType> &operands,
-                                     Attribute &mapAttr, StringRef attrName,
-                                     NamedAttrList &attrs,
-                                     Delimiter delimiter) override {
-    SmallVector<OperandType, 2> dimOperands;
-    SmallVector<OperandType, 1> symOperands;
+  ParseResult
+  parseAffineMapOfSSAIds(SmallVectorImpl<UnresolvedOperand> &operands,
+                         Attribute &mapAttr, StringRef attrName,
+                         NamedAttrList &attrs, Delimiter delimiter) override {
+    SmallVector<UnresolvedOperand, 2> dimOperands;
+    SmallVector<UnresolvedOperand, 1> symOperands;
 
     auto parseElement = [&](bool isSymbol) -> ParseResult {
-      OperandType operand;
+      UnresolvedOperand operand;
       if (parseOperand(operand))
         return failure();
       if (isSymbol)
@@ -1425,11 +1427,11 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parse an AffineExpr of SSA ids.
   ParseResult
-  parseAffineExprOfSSAIds(SmallVectorImpl<OperandType> &dimOperands,
-                          SmallVectorImpl<OperandType> &symbOperands,
+  parseAffineExprOfSSAIds(SmallVectorImpl<UnresolvedOperand> &dimOperands,
+                          SmallVectorImpl<UnresolvedOperand> &symbOperands,
                           AffineExpr &expr) override {
     auto parseElement = [&](bool isSymbol) -> ParseResult {
-      OperandType operand;
+      UnresolvedOperand operand;
       if (parseOperand(operand))
         return failure();
       if (isSymbol)
@@ -1448,7 +1450,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parse a region that takes `arguments` of `argTypes` types.  This
   /// effectively defines the SSA values of `arguments` and assigns their type.
-  ParseResult parseRegion(Region &region, ArrayRef<OperandType> arguments,
+  ParseResult parseRegion(Region &region, ArrayRef<UnresolvedOperand> arguments,
                           ArrayRef<Type> argTypes,
                           ArrayRef<Location> argLocations,
                           bool enableNameShadowing) override {
@@ -1458,7 +1460,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
     SmallVector<std::pair<OperationParser::SSAUseInfo, Type>, 2>
         regionArguments;
     for (auto pair : llvm::zip(arguments, argTypes)) {
-      const OperandType &operand = std::get<0>(pair);
+      const UnresolvedOperand &operand = std::get<0>(pair);
       Type type = std::get<1>(pair);
       OperationParser::SSAUseInfo operandInfo = {operand.name, operand.number,
                                                  operand.location};
@@ -1477,7 +1479,7 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parses a region if present.
   OptionalParseResult parseOptionalRegion(Region &region,
-                                          ArrayRef<OperandType> arguments,
+                                          ArrayRef<UnresolvedOperand> arguments,
                                           ArrayRef<Type> argTypes,
                                           ArrayRef<Location> argLocations,
                                           bool enableNameShadowing) override {
@@ -1490,10 +1492,9 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   /// Parses a region if present. If the region is present, a new region is
   /// allocated and placed in `region`. If no region is present, `region`
   /// remains untouched.
-  OptionalParseResult
-  parseOptionalRegion(std::unique_ptr<Region> &region,
-                      ArrayRef<OperandType> arguments, ArrayRef<Type> argTypes,
-                      bool enableNameShadowing = false) override {
+  OptionalParseResult parseOptionalRegion(
+      std::unique_ptr<Region> &region, ArrayRef<UnresolvedOperand> arguments,
+      ArrayRef<Type> argTypes, bool enableNameShadowing = false) override {
     if (parser.getToken().isNot(Token::l_brace))
       return llvm::None;
     std::unique_ptr<Region> newRegion = std::make_unique<Region>();
@@ -1507,19 +1508,20 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parse a region argument. The type of the argument will be resolved later
   /// by a call to `parseRegion`.
-  ParseResult parseRegionArgument(OperandType &argument) override {
+  ParseResult parseRegionArgument(UnresolvedOperand &argument) override {
     return parseOperand(argument);
   }
 
   /// Parse a region argument if present.
-  ParseResult parseOptionalRegionArgument(OperandType &argument) override {
+  ParseResult
+  parseOptionalRegionArgument(UnresolvedOperand &argument) override {
     if (parser.getToken().isNot(Token::percent_identifier))
       return success();
     return parseRegionArgument(argument);
   }
 
   ParseResult
-  parseRegionArgumentList(SmallVectorImpl<OperandType> &result,
+  parseRegionArgumentList(SmallVectorImpl<UnresolvedOperand> &result,
                           int requiredOperandCount = -1,
                           Delimiter delimiter = Delimiter::None) override {
     return parseOperandOrRegionArgList(result, /*isOperandList=*/false,
@@ -1563,14 +1565,14 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
 
   /// Parse a list of assignments of the form
   ///   (%x1 = %y1, %x2 = %y2, ...).
-  OptionalParseResult
-  parseOptionalAssignmentList(SmallVectorImpl<OperandType> &lhs,
-                              SmallVectorImpl<OperandType> &rhs) override {
+  OptionalParseResult parseOptionalAssignmentList(
+      SmallVectorImpl<UnresolvedOperand> &lhs,
+      SmallVectorImpl<UnresolvedOperand> &rhs) override {
     if (failed(parseOptionalLParen()))
       return llvm::None;
 
     auto parseElt = [&]() -> ParseResult {
-      OperandType regionArg, operand;
+      UnresolvedOperand regionArg, operand;
       if (parseRegionArgument(regionArg) || parseEqual() ||
           parseOperand(operand))
         return failure();
@@ -1584,14 +1586,14 @@ class CustomOpAsmParser : public AsmParserImpl<OpAsmParser> {
   /// Parse a list of assignments of the form
   ///   (%x1 = %y1 : type1, %x2 = %y2 : type2, ...).
   OptionalParseResult
-  parseOptionalAssignmentListWithTypes(SmallVectorImpl<OperandType> &lhs,
-                                       SmallVectorImpl<OperandType> &rhs,
+  parseOptionalAssignmentListWithTypes(SmallVectorImpl<UnresolvedOperand> &lhs,
+                                       SmallVectorImpl<UnresolvedOperand> &rhs,
                                        SmallVectorImpl<Type> &types) override {
     if (failed(parseOptionalLParen()))
       return llvm::None;
 
     auto parseElt = [&]() -> ParseResult {
-      OperandType regionArg, operand;
+      UnresolvedOperand regionArg, operand;
       Type type;
       if (parseRegionArgument(regionArg) || parseEqual() ||
           parseOperand(operand) || parseColon() || parseType(type))

diff  --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp
index 8c8a230fba20b..5d4289a388f17 100644
--- a/mlir/test/lib/Dialect/Test/TestDialect.cpp
+++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp
@@ -415,9 +415,8 @@ void FoldToCallOp::getCanonicalizationPatterns(RewritePatternSet &results,
 //===----------------------------------------------------------------------===//
 // Parsing
 
-static ParseResult
-parseCustomOptionalOperand(OpAsmParser &parser,
-                           Optional<OpAsmParser::OperandType> &optOperand) {
+static ParseResult parseCustomOptionalOperand(
+    OpAsmParser &parser, Optional<OpAsmParser::UnresolvedOperand> &optOperand) {
   if (succeeded(parser.parseOptionalLParen())) {
     optOperand.emplace();
     if (parser.parseOperand(*optOperand) || parser.parseRParen())
@@ -427,9 +426,9 @@ parseCustomOptionalOperand(OpAsmParser &parser,
 }
 
 static ParseResult parseCustomDirectiveOperands(
-    OpAsmParser &parser, OpAsmParser::OperandType &operand,
-    Optional<OpAsmParser::OperandType> &optOperand,
-    SmallVectorImpl<OpAsmParser::OperandType> &varOperands) {
+    OpAsmParser &parser, OpAsmParser::UnresolvedOperand &operand,
+    Optional<OpAsmParser::UnresolvedOperand> &optOperand,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &varOperands) {
   if (parser.parseOperand(operand))
     return failure();
   if (succeeded(parser.parseOptionalComma())) {
@@ -480,10 +479,11 @@ parseCustomDirectiveWithTypeRefs(OpAsmParser &parser, Type operandType,
   return success();
 }
 static ParseResult parseCustomDirectiveOperandsAndTypes(
-    OpAsmParser &parser, OpAsmParser::OperandType &operand,
-    Optional<OpAsmParser::OperandType> &optOperand,
-    SmallVectorImpl<OpAsmParser::OperandType> &varOperands, Type &operandType,
-    Type &optOperandType, SmallVectorImpl<Type> &varOperandTypes) {
+    OpAsmParser &parser, OpAsmParser::UnresolvedOperand &operand,
+    Optional<OpAsmParser::UnresolvedOperand> &optOperand,
+    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &varOperands,
+    Type &operandType, Type &optOperandType,
+    SmallVectorImpl<Type> &varOperandTypes) {
   if (parseCustomDirectiveOperands(parser, operand, optOperand, varOperands) ||
       parseCustomDirectiveResults(parser, operandType, optOperandType,
                                   varOperandTypes))
@@ -533,7 +533,7 @@ static ParseResult parseCustomDirectiveAttrDict(OpAsmParser &parser,
   return parser.parseOptionalAttrDict(attrs);
 }
 static ParseResult parseCustomDirectiveOptionalOperandRef(
-    OpAsmParser &parser, Optional<OpAsmParser::OperandType> &optOperand) {
+    OpAsmParser &parser, Optional<OpAsmParser::UnresolvedOperand> &optOperand) {
   int64_t operandCount = 0;
   if (parser.parseInteger(operandCount))
     return failure();
@@ -624,7 +624,7 @@ static void printCustomDirectiveOptionalOperandRef(OpAsmPrinter &printer,
 
 ParseResult IsolatedRegionOp::parse(OpAsmParser &parser,
                                     OperationState &result) {
-  OpAsmParser::OperandType argInfo;
+  OpAsmParser::UnresolvedOperand argInfo;
   Type argType = parser.getBuilder().getIndexType();
 
   // Parse the input operand.
@@ -774,7 +774,7 @@ ParseResult PrettyPrintedRegionOp::parse(OpAsmParser &parser,
   Location currLocation = parser.getEncodedSourceLoc(loc);
 
   // Parse the operands.
-  SmallVector<OpAsmParser::OperandType, 2> operands;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operands;
   if (parser.parseOperandList(operands))
     return failure();
 
@@ -867,7 +867,7 @@ void PrettyPrintedRegionOp::print(OpAsmPrinter &p) {
 //===----------------------------------------------------------------------===//
 
 ParseResult PolyForOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 4> ivsInfo;
+  SmallVector<OpAsmParser::UnresolvedOperand, 4> ivsInfo;
   // Parse list of region arguments without a delimiter.
   if (parser.parseRegionArgumentList(ivsInfo))
     return failure();
@@ -1205,7 +1205,7 @@ void RegionIfOp::print(OpAsmPrinter &p) {
 }
 
 ParseResult RegionIfOp::parse(OpAsmParser &parser, OperationState &result) {
-  SmallVector<OpAsmParser::OperandType, 2> operandInfos;
+  SmallVector<OpAsmParser::UnresolvedOperand, 2> operandInfos;
   SmallVector<Type, 2> operandTypes;
 
   result.regions.reserve(3);

diff  --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 044f1b01c3bd3..3bf9ad99a34b8 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -471,7 +471,7 @@ const char *const variadicOperandParserCode = R"(
 const char *const optionalOperandParserCode = R"(
   {
     {0}OperandsLoc = parser.getCurrentLocation();
-    ::mlir::OpAsmParser::OperandType operand;
+    ::mlir::OpAsmParser::UnresolvedOperand operand;
     ::mlir::OptionalParseResult parseResult =
                                     parser.parseOptionalOperand(operand);
     if (parseResult.hasValue()) {
@@ -787,7 +787,7 @@ static void genElementParserStorage(FormatElement *element, const Operator &op,
       genElementParserStorage(paramElement, op, body);
 
   } else if (isa<OperandsDirective>(element)) {
-    body << "  ::mlir::SmallVector<::mlir::OpAsmParser::OperandType, 4> "
+    body << "  ::mlir::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> "
             "allOperands;\n";
 
   } else if (isa<RegionsDirective>(element)) {
@@ -805,17 +805,18 @@ static void genElementParserStorage(FormatElement *element, const Operator &op,
   } else if (auto *operand = dyn_cast<OperandVariable>(element)) {
     StringRef name = operand->getVar()->name;
     if (operand->getVar()->isVariableLength()) {
-      body << "  ::mlir::SmallVector<::mlir::OpAsmParser::OperandType, 4> "
-           << name << "Operands;\n";
+      body
+          << "  ::mlir::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> "
+          << name << "Operands;\n";
       if (operand->getVar()->isVariadicOfVariadic()) {
         body << "    llvm::SmallVector<int32_t> " << name
              << "OperandGroupSizes;\n";
       }
     } else {
-      body << "  ::mlir::OpAsmParser::OperandType " << name
+      body << "  ::mlir::OpAsmParser::UnresolvedOperand " << name
            << "RawOperands[1];\n"
-           << "  ::llvm::ArrayRef<::mlir::OpAsmParser::OperandType> " << name
-           << "Operands(" << name << "RawOperands);";
+           << "  ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> "
+           << name << "Operands(" << name << "RawOperands);";
     }
     body << llvm::formatv("  ::llvm::SMLoc {0}OperandsLoc;\n"
                           "  (void){0}OperandsLoc;\n",
@@ -929,13 +930,13 @@ static void genCustomDirectiveParser(CustomDirective *dir, MethodBody &body) {
            << "OperandsLoc = parser.getCurrentLocation();\n";
       if (var->isOptional()) {
         body << llvm::formatv(
-            "    ::llvm::Optional<::mlir::OpAsmParser::OperandType> "
+            "    ::llvm::Optional<::mlir::OpAsmParser::UnresolvedOperand> "
             "{0}Operand;\n",
             var->name);
       } else if (var->isVariadicOfVariadic()) {
         body << llvm::formatv("    "
                               "::llvm::SmallVector<::llvm::SmallVector<::mlir::"
-                              "OpAsmParser::OperandType>> "
+                              "OpAsmParser::UnresolvedOperand>> "
                               "{0}OperandGroups;\n",
                               var->name);
       }
@@ -958,7 +959,7 @@ static void genCustomDirectiveParser(CustomDirective *dir, MethodBody &body) {
         body << llvm::formatv(
             "    {0} {1}Operand = {1}Operands.empty() ? {0}() : "
             "{1}Operands[0];\n",
-            "::llvm::Optional<::mlir::OpAsmParser::OperandType>",
+            "::llvm::Optional<::mlir::OpAsmParser::UnresolvedOperand>",
             operand->getVar()->name);
 
       } else if (auto *type = dyn_cast<TypeDirective>(input)) {
@@ -1432,7 +1433,7 @@ void OperationFormat::genParserOperandTypeResolution(
     // llvm::concat does not allow the case of a single range, so guard it here.
     body << "  if (parser.resolveOperands(";
     if (op.getNumOperands() > 1) {
-      body << "::llvm::concat<const ::mlir::OpAsmParser::OperandType>(";
+      body << "::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(";
       llvm::interleaveComma(op.getOperands(), body, [&](auto &operand) {
         body << operand.name << "Operands";
       });


        


More information about the Mlir-commits mailing list