llvm/mlir/docs
Lei Zhang 35b685270b [mlir] Add a signedness semantics bit to IntegerType
Thus far IntegerType has been signless: a value of IntegerType does
not have a sign intrinsically and it's up to the specific operation
to decide how to interpret those bits. For example, std.addi does
two's complement arithmetic, and std.divis/std.diviu treats the first
bit as a sign.

This design choice was made some time ago when we did't have lots
of dialects and dialects were more rigid. Today we have much more
extensible infrastructure and different dialect may want different
modelling over integer signedness. So while we can say we want
signless integers in the standard dialect, we cannot dictate for
others. Requiring each dialect to model the signedness semantics
with another set of custom types is duplicating the functionality
everywhere, considering the fundamental role integer types play.

This CL extends the IntegerType with a signedness semantics bit.
This gives each dialect an option to opt in signedness semantics
if that's what they want and helps code sharing. The parser is
modified to recognize `si[1-9][0-9]*` and `ui[1-9][0-9]*` as
signed and unsigned integer types, respectively, leaving the
original `i[1-9][0-9]*` to continue to mean no indication over
signedness semantics. All existing dialects are not affected (yet)
as this is a feature to opt in.

More discussions can be found at:

https://groups.google.com/a/tensorflow.org/d/msg/mlir/XmkV8HOPWpo/7O4X0Nb_AQAJ

Differential Revision: https://reviews.llvm.org/D72533
2020-02-21 09:16:54 -05:00
..
Dialects [mlir] Fix multiple titles 2020-02-17 13:55:46 -08:00
includes/img
Tutorials/Toy Fix some typos in the MLIR documentation. 2020-02-20 11:09:28 -08:00
Canonicalization.md
CMakeLists.txt
ConversionToLLVMDialect.md [mlir] use unpacked memref descriptors at function boundaries 2020-02-10 15:03:43 +01:00
DeclarativeRewrites.md NFC: add indexing operator for ArrayAttr 2020-02-14 22:54:37 -08:00
DefiningAttributesAndTypes.md [mlir] Refactor the structure of the 'verifyConstructionInvariants' methods. 2020-02-20 10:37:52 -08:00
Diagnostics.md
DialectConversion.md [mlir] Refactor TypeConverter to add conversions without inheritance 2020-02-18 16:17:48 -08:00
doxygen-mainpage.dox
doxygen.cfg.in
EDSC.md [mlir][EDSC] Almost NFC - Refactor and untangle EDSC dependencies 2020-02-10 12:10:41 -05:00
GenericDAGRewriter.md
Interfaces.md
LangRef.md [mlir] Add a signedness semantics bit to IntegerType 2020-02-21 09:16:54 -05:00
MLIRForGraphAlgorithms.md
OpDefinitions.md [mlir][DeclarativeParser] Add support for attributes with buildable types. 2020-02-08 15:46:46 -08:00
Passes.md
Quantization.md
QuickstartRewrites.md
Rationale.md [mlir] Add a signedness semantics bit to IntegerType 2020-02-21 09:16:54 -05:00
RationaleLinalgDialect.md [mlir] Fix multiple titles 2020-02-17 13:55:46 -08:00
RationaleSimplifiedPolyhedralForm.md
README.txt [mlir] Add short readme.txt to docs directory 2020-02-18 08:35:22 -08:00
ShapeInference.md
SymbolsAndSymbolTables.md [mlir] Address post commit feedback of D73590 for SymbolsAndSymbolTables.md 2020-02-16 21:07:20 -08:00
Traits.md [mlir] Add a document detailing the design of the SymbolTable. 2020-02-08 10:40:07 -08:00
UsageOfConst.md
WritingAPass.md Fix some typos in the MLIR documentation. 2020-02-20 11:09:28 -08:00

MLIR documentation
==================

Please note mlir.llvm.org is where MLIR's rendered documentation is displayed.
The viewing experience on GitHub or elsewhere may not match those of the
website. For any changes please verify instead that they work on the main
website first.

See https://github.com/llvm/mlir-www for the website generation information.