llvm-project/mlir/g3doc
Alex Zinenko 3b207d3691 Add support for hexadecimal float literals
MLIR does not have support for parsing special floating point values such as
infinities and NaNs.  If programmatically constructed, these values are printed
as NaN and (+-)Inf and cannot be parsed back.  Add parser support for
hexadecimal literals in float attributes, following LLVM IR.  The literal
corresponds to the in-memory representation of the floating point value.
IEEE 754 defines a range of possible values for NaNs, storing the bitwise
representation allows MLIR to properly roundtrip NaNs with different bit values
of significands.

The initial version of this commit was missing support for float literals that
used to be printed in decimal notation as a fallback, but ended up being
printed in hexadecimal format which became the fallback for special values.
The decimal fallback behavior was not exercised by tests.  It is currently
reinstated and tested by the newly added test @f32_potential_precision_loss in
parser.mlir.

PiperOrigin-RevId: 260790900
2019-07-30 14:06:26 -07:00
..
Dialects Fix typos 2019-07-13 05:56:05 -07:00
Tutorials Fix typos 2019-07-13 05:56:05 -07:00
includes MLIR graph rewrite using pattern quickstart doc. 2019-03-29 16:14:35 -07:00
Canonicalization.md Replace the implementation of Function and Module with FuncOp and ModuleOp. 2019-07-03 14:37:18 -07:00
ConversionToLLVMDialect.md Rename "convert-to-llvmir" to "lower-to-llvm" (NFC) 2019-05-06 08:19:52 -07:00
DefiningAttributesAndTypes.md Add an example of accessing the impl storage to the 'DefiningAttributesAndTypes' document. 2019-06-01 20:07:51 -07:00
DeveloperGuide.md Add an initial TestingGuide document to describe testing in MLIR. 2019-07-19 11:38:31 -07:00
Diagnostics.md Fix typos 2019-07-13 05:56:05 -07:00
GenericDAGRewriter.md Replace usages of instruction with operation in the g3 documents. 2019-03-29 17:56:57 -07:00
LangRef.md Add support for hexadecimal float literals 2019-07-30 14:06:26 -07:00
MLIRForGraphAlgorithms.md Rename -verify mlir-opt flag to -verify-expected-diagnostics 2019-06-19 23:08:03 -07:00
OpDefinitions.md docs: minor spelling tweaks 2019-07-02 16:43:02 -07:00
Passes.md Prepend an "affine-" prefix to Affine pass option names - NFC 2019-05-06 08:26:44 -07:00
Quantization.md Bring naming of some quant ops in alignment with docs and introduce a few necessary additional ops (stats_ref, stats, coupled_ref). 2019-04-18 11:49:14 -07:00
QuickstartRewrites.md Unify the 'constantFold' and 'fold' hooks on an operation into just 'fold'. This new unified fold hook will take constant attributes as operands, and may return an existing 'Value *' or a constant 'Attribute' when folding. This removes the awkward situation where a simple canonicalization like "sub(x,x)->0" had to be written as a canonicalization pattern as opposed to a fold. 2019-05-20 13:44:24 -07:00
Rationale.md Replace the implementation of Function and Module with FuncOp and ModuleOp. 2019-07-03 14:37:18 -07:00
RationaleSimplifiedPolyhedralForm.md docs: minor spelling tweaks 2019-07-02 16:43:02 -07:00
TestingGuide.md Add an initial TestingGuide document to describe testing in MLIR. 2019-07-19 11:38:31 -07:00
UsageOfConst.md Replace usages of instruction with operation in the g3 documents. 2019-03-29 17:56:57 -07:00
WritingAPass.md NFC: Update usage of multi-threading flags. 2019-07-22 11:29:47 -07:00