<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62489>62489</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Documentation flaws in Builtin Dialect of MLIR
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Stevengre
</td>
</tr>
</table>
<pre>
# The flaws in https://mlir.llvm.org/docs/Dialects/Builtin/
## 1. bool-literal
is not defined
## 2. FusedLoc
Example misses a "]"
## 3. fused-location
The correct definition may like:
```BNF
fused-location ::= `fused` fusion-metadata? `[` location (`,` location)* `]`
```
## 4. builtin.module
The correct definition may like:
```BNF
operation ::= `module` (string-attribute)? (`attributes` dictionary-attribute)? {operation*}
```
ps: there is no explanation of "builtin.module" and "module"
## 5. builtin.unrealized_conversion_cast
The correct definition may like:
```BNF
operation ::= `unrealized_conversion_cast` (value-id-list `:` type-list-no-parens)? `to` type-list-no-parens (dictionary-attribute)?
```
## 6. FunctionType
The correct definition may like:
```BNF
function-result-type ::= type-list-parens | non-function-type
function-type ::= type-list-parens `->` function-result-type
```
Furthermore, there is no definition of "non-function-type"
## 7. MemRefType
The correct definition may like:
```BNF
memref-type ::= `memref` `<` ((dimension `x`)+|`*`)? type
(`,` layout-specification)? (`,` memory-space)? `>`
layout-specification ::= attribute-value
memory-space ::= attribute-value
```
## 8. NoneType
does not have a syntax.
## 9. attr-data
no definition, the correct definition may like?
```BNF
attr-data ::= string-literal
```
## 10. resource-handle
no definition, the correct definition may like?
```BNF
resource-handle ::= value-use
```
## 11. shaped-type
no definition, the correct definition may like?
```BNF
shaped-type ::= tensor-type | vector-type
```
## 12. shaped-type
no definition, the correct definition may like?
```BNF
shaped-type ::= tensor-type | vector-type
```
## 13. integer-set
no definition, the correct definition may in the Affine Dialect?
## 14. affine-map
no definition, the correct definition may in the Affine Dialect?
## 15. OpaqueLoc
no definition, meaning that the syntax is non-deterministic?
## 16. The information in Builtin Dialect is not sufficient to figure out the core/meta dialects of the MLIR, like Affine?
Is a dialect relationship diagram necessary?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUV12P2jgX_jXm5shRcCCQCy5moEiV2r5S395XJjkh3vVH1nbYYX_9yk4IH8PQSp1e7Ahl4Hw-5_jxic2dE3uNuCLzZzLfTHjnG2NX__d4QL23ONmZ6rgiLINvDUIt-d8OhIbG-9aR7ImwLWFbJYVNpDyoxNg9YdvKlI6w7UZwiaUPX587Ib3QwTzdkPRpeLIsRJ4msDNGUik8Wi57nXCgjYcKa6GxuuPFEth2DqtPpuzlH164aiWCEs6hAw6EMTLfhOdr7ywBqIM7labkXhjdq0OVpbEWyyG3CDpQ_AhS_Imh5D5Mnvaf5y9DSdfRIFiGzwZInkYdydOQUhhNFXpecc9Jtg3q0Ps8hbMvWwYpW19KCSsIe-rNN-F5jeNOjbMEdn3fE2WqTuKvlmhatHeqG4LnaQDuvBV6T7n3Vuw6jwF2qDKWNEpdsK5EGYJxe3xtvngekxH2RBabu-VGDoJv0CJEwgC-tJLrHqSpAwVuWsAYcF0FxSi407r5uXWdtsil-Aer76XRB7RhBb-X3Pnf1M4HCfsWH7jskIqKSuF8JEQWooM_thhlVBvacovandqZp968YRIivr0SP2ZZHvahjv7fju0vc6weYlGLrpOeBsQX_TkXcEK_WIM2mo5-fgRxJXoYI08pyT70G_R1-rs92HY28E4Zi4Strzh4UXBPwdf47pJukcBnVF-xfo8-KlQW69vSw26NikilwJz1QKrIAoXaRT7m6UucQAVhz2Sxjt-fBkm2hXNX4ObvenTxo-k8dS2WohbnMTbOg8FOoTL2SF3LSzwztl-RPs29SBdljaSlcW-MHRij_sj2EcGXCXwxGs-LUhnsX04NPyBwcEft-Utyx7VIYjoaZ31UXNFjIA48XuLbPTgu8Rj6orph_F69Sh8VN00TsOhMZ0ukDdfV6S3xnkBvElzA7UdZ535iGabTBFzDW6wuNuV7orwIfjksUDtjB-li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