[llvm-branch-commits] [mlir] 6e2af4d - Revert "[mlir] Add SmallVector sizes"

Tres Popp via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 21 17:38:04 PST 2020


Author: Tres Popp
Date: 2020-12-22T02:33:14+01:00
New Revision: 6e2af4d6046995abf1003ebacfce95415010d574

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

LOG: Revert "[mlir] Add SmallVector sizes"

This reverts commit 83274a0773f6a20abdc848b448009e0195c42166.

Fixed in a555ca8b3d67

Added: 
    

Modified: 
    mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index 09c662c74477..7b1300da1783 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -198,8 +198,8 @@ void SwitchOp::build(OpBuilder &builder, OperationState &result, Value value,
                      ArrayRef<int32_t> caseValues, BlockRange caseDestinations,
                      ArrayRef<ValueRange> caseOperands,
                      ArrayRef<int32_t> branchWeights) {
-  SmallVector<Value, 8> flattenedCaseOperands;
-  SmallVector<int32_t, 8> caseOperandOffsets;
+  SmallVector<Value> flattenedCaseOperands;
+  SmallVector<int32_t> caseOperandOffsets;
   int32_t offset = 0;
   for (ValueRange operands : caseOperands) {
     flattenedCaseOperands.append(operands.begin(), operands.end());
@@ -230,8 +230,8 @@ parseSwitchOpCases(OpAsmParser &parser, ElementsAttr &caseValues,
                    SmallVectorImpl<OpAsmParser::OperandType> &caseOperands,
                    SmallVectorImpl<Type> &caseOperandTypes,
                    ElementsAttr &caseOperandOffsets) {
-  SmallVector<int32_t, 8> values;
-  SmallVector<int32_t, 8> offsets;
+  SmallVector<int32_t> values;
+  SmallVector<int32_t> offsets;
   int32_t value, offset = 0;
   do {
     OptionalParseResult integerParseResult = parser.parseOptionalInteger(value);
@@ -243,7 +243,7 @@ parseSwitchOpCases(OpAsmParser &parser, ElementsAttr &caseValues,
     values.push_back(value);
 
     Block *destination;
-    SmallVector<OpAsmParser::OperandType, 8> operands;
+    SmallVector<OpAsmParser::OperandType> operands;
     if (parser.parseColon() || parser.parseSuccessor(destination))
       return failure();
     if (!parser.parseOptionalLParen()) {


        


More information about the llvm-branch-commits mailing list