diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td --- a/flang/include/flang/Optimizer/Dialect/FIROps.td +++ b/flang/include/flang/Optimizer/Dialect/FIROps.td @@ -529,7 +529,7 @@ CArg<"llvm::ArrayRef", "{}">:$attributes), [{ $_state.addOperands(selector); - llvm::SmallVector ivalues; + llvm::SmallVector ivalues; for (auto iv : compareOperands) ivalues.push_back($_builder.getI64IntegerAttr(iv)); ivalues.push_back($_builder.getUnitAttr()); @@ -538,7 +538,7 @@ for (auto d : destinations) $_state.addSuccessors(d); const auto opCount = destOperands.size(); - llvm::SmallVector argOffs; + llvm::SmallVector argOffs; int32_t sumArgs = 0; for (std::remove_const_t i = 0; i != count; ++i) { if (i < opCount) { @@ -564,13 +564,13 @@ if (parseSelector(parser, result, selector, type)) return mlir::failure(); - llvm::SmallVector ivalues; - llvm::SmallVector dests; - llvm::SmallVector, 8> destArgs; + llvm::SmallVector ivalues; + llvm::SmallVector dests; + llvm::SmallVector> destArgs; while (true) { mlir::Attribute ivalue; // Integer or Unit mlir::Block *dest; - llvm::SmallVector destArg; + llvm::SmallVector destArg; mlir::NamedAttrList temp; if (parser.parseAttribute(ivalue, "i", temp) || parser.parseComma() || @@ -586,7 +586,7 @@ } auto &bld = parser.getBuilder(); result.addAttribute(getCasesAttr(), bld.getArrayAttr(ivalues)); - llvm::SmallVector argOffs; + llvm::SmallVector argOffs; int32_t sumArgs = 0; const auto count = dests.size(); for (std::remove_const_t i = 0; i != count; ++i) { diff --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp --- a/flang/lib/Optimizer/Dialect/FIROps.cpp +++ b/flang/lib/Optimizer/Dialect/FIROps.cpp @@ -530,7 +530,7 @@ /// Get the result types packed in a tuple tuple mlir::Type fir::BoxDimsOp::getTupleType() { // note: triple, but 4 is nearest power of 2 - llvm::SmallVector triple{ + llvm::SmallVector triple{ getResult(0).getType(), getResult(1).getType(), getResult(2).getType()}; return mlir::TupleType::get(getContext(), triple); } @@ -555,14 +555,14 @@ p << '(' << op->getOperands().drop_front(isDirect ? 0 : 1) << ')'; p.printOptionalAttrDict(op->getAttrs(), {"callee"}); auto resultTypes{op.getResultTypes()}; - llvm::SmallVector argTypes( + llvm::SmallVector argTypes( llvm::drop_begin(op.getOperandTypes(), isDirect ? 0 : 1)); p << " : " << FunctionType::get(op.getContext(), argTypes, resultTypes); } static mlir::ParseResult parseCallOp(mlir::OpAsmParser &parser, mlir::OperationState &result) { - llvm::SmallVector operands; + llvm::SmallVector operands; if (parser.parseOperandList(operands)) return mlir::failure(); @@ -639,7 +639,7 @@ template static mlir::ParseResult parseCmpOp(mlir::OpAsmParser &parser, mlir::OperationState &result) { - llvm::SmallVector ops; + llvm::SmallVector ops; mlir::NamedAttrList attrs; mlir::Attribute predicateNameAttr; mlir::Type type; @@ -831,10 +831,10 @@ mlir::OpAsmParser::OperandType memref; if (parser.parseOperand(memref) || parser.parseComma()) return mlir::failure(); - llvm::SmallVector coorOperands; + llvm::SmallVector coorOperands; if (parser.parseOperandList(coorOperands)) return mlir::failure(); - llvm::SmallVector allOperands; + llvm::SmallVector allOperands; allOperands.push_back(memref); allOperands.append(coorOperands.begin(), coorOperands.end()); mlir::FunctionType funcTy; @@ -1848,8 +1848,8 @@ result.addAttribute("unordered", builder.getUnitAttr()); // Parse the optional initial iteration arguments. - llvm::SmallVector regionArgs, operands; - llvm::SmallVector argTypes; + llvm::SmallVector regionArgs, operands; + llvm::SmallVector argTypes; auto prependCount = false; regionArgs.push_back(inductionVariable); @@ -2318,16 +2318,16 @@ if (parseSelector(parser, result, selector, type)) return mlir::failure(); - llvm::SmallVector attrs; - llvm::SmallVector opers; - llvm::SmallVector dests; - llvm::SmallVector, 8> destArgs; - llvm::SmallVector argOffs; + llvm::SmallVector attrs; + llvm::SmallVector opers; + llvm::SmallVector dests; + llvm::SmallVector> destArgs; + llvm::SmallVector argOffs; int32_t offSize = 0; while (true) { mlir::Attribute attr; mlir::Block *dest; - llvm::SmallVector destArg; + llvm::SmallVector destArg; mlir::NamedAttrList temp; if (parser.parseAttribute(attr, "a", temp) || isValidCaseAttr(attr) || parser.parseComma()) @@ -2366,7 +2366,7 @@ parser.getBuilder().getArrayAttr(attrs)); if (parser.resolveOperands(opers, type, result.operands)) return mlir::failure(); - llvm::SmallVector targOffs; + llvm::SmallVector targOffs; int32_t toffSize = 0; const auto count = dests.size(); for (std::remove_const_t i = 0; i != count; ++i) { @@ -2434,7 +2434,7 @@ llvm::ArrayRef attributes) { result.addOperands(selector); result.addAttribute(getCasesAttr(), builder.getArrayAttr(compareAttrs)); - llvm::SmallVector operOffs; + llvm::SmallVector operOffs; int32_t operSize = 0; for (auto attr : compareAttrs) { if (attr.isa()) { @@ -2455,7 +2455,7 @@ for (auto d : destinations) result.addSuccessors(d); const auto opCount = destOperands.size(); - llvm::SmallVector argOffs; + llvm::SmallVector argOffs; int32_t sumArgs = 0; for (std::remove_const_t i = 0; i != count; ++i) { if (i < opCount) { @@ -2485,7 +2485,7 @@ llvm::ArrayRef destinations, llvm::ArrayRef destOperands, llvm::ArrayRef attributes) { - llvm::SmallVector cmpOpers; + llvm::SmallVector cmpOpers; auto iter = cmpOpList.begin(); for (auto &attr : compareAttrs) { if (attr.isa()) { @@ -2603,13 +2603,13 @@ if (parseSelector(parser, result, selector, type)) return mlir::failure(); - llvm::SmallVector attrs; - llvm::SmallVector dests; - llvm::SmallVector, 8> destArgs; + llvm::SmallVector attrs; + llvm::SmallVector dests; + llvm::SmallVector> destArgs; while (true) { mlir::Attribute attr; mlir::Block *dest; - llvm::SmallVector destArg; + llvm::SmallVector destArg; mlir::NamedAttrList temp; if (parser.parseAttribute(attr, "a", temp) || parser.parseComma() || parser.parseSuccessorAndUseList(dest, destArg)) @@ -2625,7 +2625,7 @@ auto &bld = parser.getBuilder(); result.addAttribute(fir::SelectTypeOp::getCasesAttr(), bld.getArrayAttr(attrs)); - llvm::SmallVector argOffs; + llvm::SmallVector argOffs; int32_t offSize = 0; const auto count = dests.size(); for (std::remove_const_t i = 0; i != count; ++i) {