[PATCH] D76136: [MLIR] Add support for explicitly signed / unsigned integer constants

Andi Drebes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 12:55:35 PDT 2020


andidr added a comment.

It seems that I have misinterpreted https://reviews.llvm.org/D72533 as the introduction of explicitly signed / unsigned types to MLIR in general, including std. Thanks for your clarification!

The patch originates from  work on a frontend for Tensor Expressions that includes unsigned types in the source language and that generates operations from std and linalg. The translation is implemenyed recursively with functions simply returning `mlir::Value`s. D72533 <https://reviews.llvm.org/D72533> seemed like a comfortable way to keep this scheme and to avoid modeling the sign externally. However, without support for explicitly signed data types for the operations from std, this means that either the operands need to be converted to signless integers or the operations need to be re-implemented outside of std with support for explicitly signed / unsigned operands. I am not aware of any way to convert the operands and  re-implementation of the operations seems quite redundant.

I understand your motivations to keep signless integers in std wherever possible. Any hints on how to work around the above-mentioned issues is highly appreciated. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76136





More information about the llvm-commits mailing list