Comment fixes for affine map range size parsing.

PiperOrigin-RevId: 204399402
This commit is contained in:
Uday Bondhugula 2018-07-12 18:04:04 -07:00 committed by jpienaar
parent 8fbaf79afb
commit 686fb64e2f
2 changed files with 4 additions and 5 deletions

View File

@ -577,10 +577,8 @@ AffineMap *AffineMap::get(unsigned dimCount, unsigned symbolCount,
// On the first use, we allocate them into the bump pointer.
auto *res = impl.allocator.Allocate<AffineMap>();
// Copy the results into the bump pointer.
// Copy the results and range sizes into the bump pointer.
results = impl.copyInto(ArrayRef<AffineExpr *>(results));
// Copy the results into the bump pointer.
rangeSizes = impl.copyInto(ArrayRef<AffineExpr *>(rangeSizes));
// Initialize the memory using placement new.

View File

@ -1035,7 +1035,6 @@ ParseResult AffineMapParser::parseDimIdList() {
/// dim-size ::= affine-expr | `min` `(` affine-expr ( `,` affine-expr)+ `)`
///
/// multi-dim-affine-expr ::= `(` affine-expr (`,` affine-expr)* `)
// TODO(bondhugula): parse range size information.
AffineMap *AffineMapParser::parseAffineMapInline() {
// List of dimensional identifiers.
if (parseDimIdList())
@ -1069,7 +1068,9 @@ AffineMap *AffineMapParser::parseAffineMapInline() {
return nullptr;
// Parse optional range sizes.
// (`size` `(` dim-size (`,` dim-size)* `)`)?
// range-sizes ::= (`size` `(` dim-size (`,` dim-size)* `)`)?
// dim-size ::= affine-expr | `min` `(` affine-expr (`,` affine-expr)+ `)`
// TODO(bondhugula): support for min of several affine expressions.
// TODO: check if sizes are non-negative whenever they are constant.
SmallVector<AffineExpr *, 4> rangeSizes;
if (consumeIf(Token::kw_size)) {