Lines Matching refs:layout

3 Data layout information allows the compiler to answer questions related to how a
9 The data layout subsystem is designed to scale to MLIR's open type and operation
12 * attribute interfaces that can be implemented by concrete data layout
14 * type interfaces that should be implemented by types subject to data layout;
16 as data layout scopes (e.g., modules);
17 * and dialect interfaces for data layout properties unrelated to specific
28 Following MLIR's nested structure, data layout properties are _scoped_ to
31 partially control the data layout properties and may have attributes that affect
32 them, typically organized in a data layout specification.
34 Types may have a different data layout in different scopes, including scopes
37 has fixed data layout properties. Types are also expected to have a default,
38 "natural" data layout in case they are used outside of any operation that
39 provides data layout scope for them. This ensures that data layout queries
44 The information necessary to compute layout properties can be combined from
45 nested scopes. For example, an outer scope can define layout properties for a
48 supported by the notion of data layout _compatibility_: the layout defined in a
56 Data layout compatibility is also relevant during IR transformation. Any
57 transformation that affects the data layout scoping operation is expected to
58 maintain data layout compatibility. It is under responsibility of the
63 Data layout property queries can be performed on the special object --
65 objects allow one to interface with the data layout infrastructure and query
82 the data layout properties are fixed in the scope, they will be computed only
86 caching, a `DataLayout` object returns valid results as long as the data layout
88 ancestor operations are modified in a way that affects data layout. After such a
95 Extensibility of the data layout modeling is provided through a set of MLIR
100 Data layout specification is an [attribute](LangRef.md/#attributes) that is
101 conceptually a collection of key-value pairs called data layout specification
102 _entries_. Data layout specification attributes implement the
106 specific types or dialects: when handling a data layout properties request, a
110 understand layout details of other types. Entry values are arbitrary attributes,
113 For example, a data layout specification may be an actual list of pairs with
126 We use the notion of _type class_ throughout the data layout subsystem. It
129 Instead, data layout entries contain specific _instances_ of a type class, for
132 handling a data layout property query, a type class will be supplied with _all_
137 data layout properties of _any_ specific type instance given properties of other
146 Operations that define a scope for data layout queries, and that can be used to
149 data layout specification. The specification need not be necessarily attached to
152 custom handlers for data layout queries that provide results without forwarding
155 for scoping operations to (re)define data layout properties for types without
163 Type classes that intend to handle data layout queries themselves are expected
165 hooks for each data layout query. Each of these hooks is supplied with the type
167 data layout queries relevant for the type class. It is expected to provide a
176 For data layout entries that are not related to a particular type class, the key
193 The overall flow of a data layout property query is as follows.
196 fetches the data layout specification and combines it with those of
201 4. Otherwise, the query is handed down by `DataLayout` to the closest layout
217 The default implementation of the data layout interfaces directly handles
250 [default data layout in LLVM](https://llvm.org/docs/LangRef.html#data-layout),
251 which MLIR assumed until the introduction of proper data layout modeling, and
259 e.g., `memref` operations. Its data layout is parameterized by a single integer
260 data layout entry that specifies its bitwidth. For example,
268 specifies that `index` has 32 bits. All other layout properties of `index` match
284 The default data layout assumes 8-bit bytes.