forked from OSchip/llvm-project
Comment fixes for affine map range size parsing.
PiperOrigin-RevId: 204399402
This commit is contained in:
parent
8fbaf79afb
commit
686fb64e2f
|
@ -577,10 +577,8 @@ AffineMap *AffineMap::get(unsigned dimCount, unsigned symbolCount,
|
||||||
// On the first use, we allocate them into the bump pointer.
|
// On the first use, we allocate them into the bump pointer.
|
||||||
auto *res = impl.allocator.Allocate<AffineMap>();
|
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));
|
results = impl.copyInto(ArrayRef<AffineExpr *>(results));
|
||||||
|
|
||||||
// Copy the results into the bump pointer.
|
|
||||||
rangeSizes = impl.copyInto(ArrayRef<AffineExpr *>(rangeSizes));
|
rangeSizes = impl.copyInto(ArrayRef<AffineExpr *>(rangeSizes));
|
||||||
|
|
||||||
// Initialize the memory using placement new.
|
// Initialize the memory using placement new.
|
||||||
|
|
|
@ -1035,7 +1035,6 @@ ParseResult AffineMapParser::parseDimIdList() {
|
||||||
/// dim-size ::= affine-expr | `min` `(` affine-expr ( `,` affine-expr)+ `)`
|
/// dim-size ::= affine-expr | `min` `(` affine-expr ( `,` affine-expr)+ `)`
|
||||||
///
|
///
|
||||||
/// multi-dim-affine-expr ::= `(` affine-expr (`,` affine-expr)* `)
|
/// multi-dim-affine-expr ::= `(` affine-expr (`,` affine-expr)* `)
|
||||||
// TODO(bondhugula): parse range size information.
|
|
||||||
AffineMap *AffineMapParser::parseAffineMapInline() {
|
AffineMap *AffineMapParser::parseAffineMapInline() {
|
||||||
// List of dimensional identifiers.
|
// List of dimensional identifiers.
|
||||||
if (parseDimIdList())
|
if (parseDimIdList())
|
||||||
|
@ -1069,7 +1068,9 @@ AffineMap *AffineMapParser::parseAffineMapInline() {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Parse optional range sizes.
|
// 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.
|
// TODO: check if sizes are non-negative whenever they are constant.
|
||||||
SmallVector<AffineExpr *, 4> rangeSizes;
|
SmallVector<AffineExpr *, 4> rangeSizes;
|
||||||
if (consumeIf(Token::kw_size)) {
|
if (consumeIf(Token::kw_size)) {
|
||||||
|
|
Loading…
Reference in New Issue