@@ -35,19 +35,19 @@ FailureOr<uint64_t> LvlTypeParser::parseLvlType(AsmParser &parser) const {
35
35
ERROR_IF (failed (parser.parseOptionalKeyword (&base)),
36
36
" expected valid level format (e.g. dense, compressed or singleton)" )
37
37
uint64_t properties = 0 ;
38
- SmallVector<unsigned > structure ;
38
+ SmallVector<unsigned > structured ;
39
39
40
40
if (base.compare (" structured" ) == 0 ) {
41
41
ParseResult res = parser.parseCommaSeparatedList (
42
42
mlir::OpAsmParser::Delimiter::OptionalSquare,
43
- [&]() -> ParseResult { return parseStructure (parser, &structure ); },
44
- " in structure n out of m" );
43
+ [&]() -> ParseResult { return parseStructured (parser, &structured ); },
44
+ " in structured n out of m" );
45
45
FAILURE_IF_FAILED (res)
46
- if (structure .size () != 2 ) {
47
- parser.emitError (loc, " expected exactly 2 structure sizes" );
46
+ if (structured .size () != 2 ) {
47
+ parser.emitError (loc, " expected exactly 2 structured sizes" );
48
48
return failure ();
49
49
}
50
- if (structure [0 ] > structure [1 ]) {
50
+ if (structured [0 ] > structured [1 ]) {
51
51
parser.emitError (loc, " expected n <= m in n_out_of_m" );
52
52
return failure ();
53
53
}
@@ -66,7 +66,7 @@ FailureOr<uint64_t> LvlTypeParser::parseLvlType(AsmParser &parser) const {
66
66
properties |= static_cast <uint64_t >(LevelFormat::Compressed);
67
67
} else if (base.compare (" structured" ) == 0 ) {
68
68
properties |= static_cast <uint64_t >(LevelFormat::NOutOfM);
69
- properties |= nToBits (structure [0 ]) | mToBits (structure [1 ]);
69
+ properties |= nToBits (structured [0 ]) | mToBits (structured [1 ]);
70
70
} else if (base.compare (" loose_compressed" ) == 0 ) {
71
71
properties |= static_cast <uint64_t >(LevelFormat::LooseCompressed);
72
72
} else if (base.compare (" singleton" ) == 0 ) {
@@ -99,24 +99,24 @@ ParseResult LvlTypeParser::parseProperty(AsmParser &parser,
99
99
}
100
100
101
101
ParseResult
102
- LvlTypeParser::parseStructure (AsmParser &parser,
103
- SmallVector<unsigned > *structure ) const {
102
+ LvlTypeParser::parseStructured (AsmParser &parser,
103
+ SmallVector<unsigned > *structured ) const {
104
104
int intVal;
105
105
auto loc = parser.getCurrentLocation ();
106
106
OptionalParseResult intValParseResult = parser.parseOptionalInteger (intVal);
107
107
if (intValParseResult.has_value ()) {
108
108
if (failed (*intValParseResult)) {
109
- parser.emitError (loc, " failed to parse structure size" );
109
+ parser.emitError (loc, " failed to parse structured size" );
110
110
return failure ();
111
111
}
112
112
if (intVal < 0 ) {
113
- parser.emitError (loc, " expected structure size to be >= 0" );
113
+ parser.emitError (loc, " expected structured size to be >= 0" );
114
114
return failure ();
115
115
}
116
- structure ->push_back (intVal);
116
+ structured ->push_back (intVal);
117
117
return success ();
118
118
}
119
- parser.emitError (loc, " expected valid integer for structure size" );
119
+ parser.emitError (loc, " expected valid integer for structured size" );
120
120
return failure ();
121
121
}
122
122
0 commit comments