[PATCH] D77293: [mlir][DeclarativeParser] Emit an error if a `:` follows an attribute with a non-constant type.

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 13:00:49 PDT 2020


bondhugula marked an inline comment as done.
bondhugula added inline comments.


================
Comment at: mlir/include/mlir/Dialect/Affine/IR/AffineOpsBase.td:23
   let returnType = [{ AffineMap }];
+  let valueType = Index;
   let constBuilderCall = "AffineMapAttr::get($0)";
----------------
rriddle wrote:
> bondhugula wrote:
> > Shouldn't this be I64? The affine map's results / inputs are Index type, but when the affine map is a constant, that constant is an int64 (and not of index bit width).
> I'm basing this off of the type of the MLIR attribute, which is always Index.
> 
> https://github.com/llvm/llvm-project/blob/6acd3003755db3944f7fcbea7542bd574a41c0a0/mlir/lib/IR/AttributeDetail.h#L34 
I see - looks like I completed missed what valueType here meant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77293/new/

https://reviews.llvm.org/D77293





More information about the llvm-commits mailing list