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

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 14:34:15 PDT 2020


rriddle added a comment.

In D76136#1922172 <https://reviews.llvm.org/D76136#1922172>, @andidr wrote:

> 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 hint on how to work around the above-mentioned issues is highly appreciated. Thanks!


I'd love to discuss more. To make it easier, could you post about what you are doing on https://llvm.discourse.group/c/llvm-project/mlir/?


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