3 The builtin dialect contains a core set of Attributes, Operations, and Types
4 that have wide applicability across a very large number of domains and
5 abstractions. Many of the components of this dialect are also instrumental in
6 the implementation of the core IR. As such, this dialect is implicitly loaded in
7 every `MLIRContext`, and available directly to all users of MLIR.
9 Given the far-reaching nature of this dialect and the fact that MLIR is
10 extensible by design, any potential additions are heavily scrutinized.
16 [include "Dialects/BuiltinAttributes.md"]
18 ## Location Attributes
20 A subset of the builtin attribute values correspond to
21 [source locations](../Diagnostics.md/#source-locations), that may be attached to
24 [include "Dialects/BuiltinLocationAttributes.md"]
28 A DistinctAttribute associates an attribute with a unique identifier.
29 As a result, multiple DistinctAttribute instances may point to the same
30 attribute. Every call to the `create` function allocates a new
31 DistinctAttribute instance. The address of the attribute instance serves as a
32 temporary unique identifier. Similar to the names of SSA values, the final
33 unique identifiers are generated during pretty printing. This delayed
34 numbering ensures the printed identifiers are deterministic even if
35 multiple DistinctAttribute instances are created in-parallel.
40 distinct-id ::= integer-literal
41 distinct-attribute ::= `distinct` `[` distinct-id `]<` attribute `>`
47 #distinct = distinct[0]<42.0 : f32>
48 #distinct1 = distinct[1]<42.0 : f32>
49 #distinct2 = distinct[2]<array<i32: 10, 42>>
52 This mechanism is meant to generate attributes with a unique
53 identifier, which can be used to mark groups of operations that share a
54 common property. For example, groups of aliasing memory operations may be
55 marked using one DistinctAttribute instance per alias group.
59 [include "Dialects/BuiltinOps.md"]
63 [include "Dialects/BuiltinTypes.md"]
67 [include "Dialects/BuiltinTypeInterfaces.md"]