@@ -40,7 +40,7 @@ Operation traits may also provide a `verifyTrait` or `verifyRegionTrait` hook
40
40
that is called when verifying the concrete operation. The difference between
41
41
these two is that whether the verifier needs to access the regions, if so, the
42
42
operations in the regions will be verified before the verification of this
43
- trait. The [verification order](DefiningDialects/Operations.md/#verification-ordering)
43
+ trait. The [verification order](../ DefiningDialects/Operations.md/#verification-ordering)
44
44
determines when a verifier will be invoked.
45
45
46
46
```c++
@@ -155,7 +155,7 @@ class MyType : public Type::TypeBase<MyType, ..., MyTrait, MyParametricTrait<10>
155
155
156
156
### Attaching Operation Traits in ODS
157
157
158
- To use an operation trait in the [ ODS] ( DefiningDialects/Operations.md ) framework, we need to
158
+ To use an operation trait in the [ ODS] ( ../ DefiningDialects/Operations.md) framework, we need to
159
159
provide a definition of the trait class. This can be done using the
160
160
` NativeOpTrait ` and ` ParamNativeOpTrait ` classes. ` ParamNativeOpTrait ` provides
161
161
a mechanism in which to specify arguments to a parametric trait class with an
@@ -177,7 +177,7 @@ These can then be used in the `traits` list of an op definition:
177
177
def OpWithInferTypeInterfaceOp : Op<...[MyTrait, MyParametricTrait<10>]> { ... }
178
178
```
179
179
180
- See the documentation on [ operation definitions] ( DefiningDialects/Operations.md ) for more
180
+ See the documentation on [ operation definitions] ( ../ DefiningDialects/Operations.md) for more
181
181
details.
182
182
183
183
## Using a Trait
@@ -186,7 +186,7 @@ Traits may be used to provide additional methods, static fields, or other
186
186
information directly on the concrete object. ` Traits ` internally become ` Base `
187
187
classes of the concrete operation, so all of these are directly accessible. To
188
188
expose this information opaquely to transformations and analyses,
189
- [`interfaces`](Interfaces.md) may be used.
189
+ [`interfaces`](../ Interfaces.md) may be used.
190
190
191
191
To query if a specific object contains a specific trait, the `hasTrait<>` method
192
192
may be used. This takes as a template parameter the trait class , which is the
@@ -231,7 +231,7 @@ This trait is carried by region holding operations that define a new scope for
231
231
automatic allocation. Such allocations are automatically freed when control is
232
232
transferred back from the regions of such operations. As an example, allocations
233
233
performed by
234
- [`memref.alloca`](Dialects/MemRef.md/#memrefalloca-mlirmemrefallocaop ) are
234
+ [`memref.alloca`](../ Dialects/MemRef.md/#memrefalloca-memrefallocaop ) are
235
235
automatically freed when control leaves the region of its closest surrounding op
236
236
that has the trait AutomaticAllocationScope.
237
237
@@ -241,7 +241,8 @@ that has the trait AutomaticAllocationScope.
241
241
242
242
This trait adds the property that the operation is known to have
243
243
[broadcast-compatible](https:// docs.scipy.org/doc/numpy/user/basics.broadcasting.html)
244
- operands and that its result type is compatible with the inferred broadcast shape. See [The `Broadcastable` Trait](Traits/Broadcastable.md) for details.
244
+ operands and that its result type is compatible with the inferred broadcast shape.
245
+ See [The `Broadcastable` Trait](Broadcastable.md) for details.
245
246
246
247
### Commutative
247
248
@@ -290,7 +291,7 @@ foo.region_op {
290
291
```
291
292
292
293
This trait is an important structural property of the IR, and enables operations
293
- to have [ passes] ( PassManagement.md ) scheduled under them.
294
+ to have [ passes] ( ../PassManagement ) scheduled under them.
294
295
295
296
### MemRefsNormalizable
296
297
@@ -302,8 +303,7 @@ type where those references can be 'normalized'. In cases where an associated
302
303
operations can be modified so that the ` MemRef ` has an identity layout
303
304
specification. This can be implemented by associating the operation with its own
304
305
index expression that can express the equivalent of the memory-layout
305
- specification of the MemRef type. See [ the -normalize-memrefs pass] .
306
- (https:// mlir.llvm.org/docs/Passes/#-normalize-memrefs-normalize-memrefs)
306
+ specification of the MemRef type. See [ the -normalize-memrefs pass] ( ../Passes.md/#-normalize-memrefs ) .
307
307
308
308
### Single Block Region
309
309
@@ -325,18 +325,18 @@ that the single block must terminate with `TerminatorOpType`.
325
325
* ` OpTrait::SymbolTable ` -- ` SymbolTable `
326
326
327
327
This trait is used for operations that define a
328
- [`SymbolTable`](SymbolsAndSymbolTables.md#symbol-table).
328
+ [`SymbolTable`](../ SymbolsAndSymbolTables.md/ #symbol-table).
329
329
330
330
### Terminator
331
331
332
332
* `OpTrait::IsTerminator` -- `Terminator`
333
333
334
334
This trait provides verification and functionality for operations that are known
335
- to be [terminators](LangRef.md#terminator-operations ).
335
+ to be [terminators](../ LangRef.md/#control-flow- and -ssacfg-regions ).
336
336
337
337
* `OpTrait::NoTerminator` -- `NoTerminator`
338
338
339
339
This trait removes the requirement on regions held by an operation to have
340
- [terminator operations](LangRef.md#terminator-operations ) at the end of a block.
340
+ [terminator operations](../ LangRef.md/#control-flow- and -ssacfg-regions ) at the end of a block.
341
341
This requires that these regions have a single block. An example of operation
342
342
using this trait is the top-level `ModuleOp`.
0 commit comments