Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
Show First 20 Lines • Show All 882 Lines • ▼ Show 20 Lines | def CriticalDeclareOp : OpenMP_Op<"critical.declare", [Symbol]> { | ||||
let description = [{ | let description = [{ | ||||
Declares a named critical section. | Declares a named critical section. | ||||
The name can be used in critical constructs in the dialect. | The name can be used in critical constructs in the dialect. | ||||
}]; | }]; | ||||
let arguments = (ins SymbolNameAttr:$sym_name, | let arguments = (ins SymbolNameAttr:$sym_name, | ||||
DefaultValuedAttr<I64Attr, "0">:$hint_val); | DefaultValuedOptionalAttr<I64Attr, "0">:$hint_val); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
$sym_name oilist(`hint` `(` custom<SynchronizationHint>($hint_val) `)`) | $sym_name oilist(`hint` `(` custom<SynchronizationHint>($hint_val) `)`) | ||||
attr-dict | attr-dict | ||||
}]; | }]; | ||||
let hasVerifier = 1; | let hasVerifier = 1; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | let description = [{ | ||||
optimization. | optimization. | ||||
`memory_order` indicates the memory ordering behavior of the construct. It | `memory_order` indicates the memory ordering behavior of the construct. It | ||||
can be one of `seq_cst`, `acquire` or `relaxed`. | can be one of `seq_cst`, `acquire` or `relaxed`. | ||||
}]; | }]; | ||||
let arguments = (ins OpenMP_PointerLikeType:$x, | let arguments = (ins OpenMP_PointerLikeType:$x, | ||||
OpenMP_PointerLikeType:$v, | OpenMP_PointerLikeType:$v, | ||||
DefaultValuedAttr<I64Attr, "0">:$hint_val, | DefaultValuedOptionalAttr<I64Attr, "0">:$hint_val, | ||||
OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
$v `=` $x | $v `=` $x | ||||
oilist( `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | oilist( `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | ||||
| `hint` `(` custom<SynchronizationHint>($hint_val) `)`) | | `hint` `(` custom<SynchronizationHint>($hint_val) `)`) | ||||
`:` type($x) attr-dict | `:` type($x) attr-dict | ||||
}]; | }]; | ||||
let hasVerifier = 1; | let hasVerifier = 1; | ||||
Show All 30 Lines | let description = [{ | ||||
optimization. | optimization. | ||||
`memory_order` indicates the memory ordering behavior of the construct. It | `memory_order` indicates the memory ordering behavior of the construct. It | ||||
can be one of `seq_cst`, `release` or `relaxed`. | can be one of `seq_cst`, `release` or `relaxed`. | ||||
}]; | }]; | ||||
let arguments = (ins OpenMP_PointerLikeType:$address, | let arguments = (ins OpenMP_PointerLikeType:$address, | ||||
AnyType:$value, | AnyType:$value, | ||||
DefaultValuedAttr<I64Attr, "0">:$hint_val, | DefaultValuedOptionalAttr<I64Attr, "0">:$hint_val, | ||||
OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
$address `=` $value | $address `=` $value | ||||
oilist( `hint` `(` custom<SynchronizationHint>($hint_val) `)` | oilist( `hint` `(` custom<SynchronizationHint>($hint_val) `)` | ||||
| `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)`) | | `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)`) | ||||
`:` type($address) `,` type($value) | `:` type($address) `,` type($value) | ||||
attr-dict | attr-dict | ||||
}]; | }]; | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | let description = [{ | ||||
the core update operation is directly translated like regular operations by | the core update operation is directly translated like regular operations by | ||||
the host dialect. The front-end must handle semantic checks for allowed | the host dialect. The front-end must handle semantic checks for allowed | ||||
operations. | operations. | ||||
}]; | }]; | ||||
let arguments = (ins Arg<OpenMP_PointerLikeType, | let arguments = (ins Arg<OpenMP_PointerLikeType, | ||||
"Address of variable to be updated", | "Address of variable to be updated", | ||||
[MemRead, MemWrite]>:$x, | [MemRead, MemWrite]>:$x, | ||||
DefaultValuedAttr<I64Attr, "0">:$hint_val, | DefaultValuedOptionalAttr<I64Attr, "0">:$hint_val, | ||||
OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | ||||
let regions = (region SizedRegion<1>:$region); | let regions = (region SizedRegion<1>:$region); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
oilist( `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | oilist( `memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | ||||
| `hint` `(` custom<SynchronizationHint>($hint_val) `)`) | | `hint` `(` custom<SynchronizationHint>($hint_val) `)`) | ||||
$x `:` type($x) $region attr-dict | $x `:` type($x) $region attr-dict | ||||
}]; | }]; | ||||
let hasVerifier = 1; | let hasVerifier = 1; | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | ``` | ||||
omp.atomic.read ... | omp.atomic.read ... | ||||
omp.atomic.write ... | omp.atomic.write ... | ||||
omp.terminator | omp.terminator | ||||
} | } | ||||
``` | ``` | ||||
}]; | }]; | ||||
let arguments = (ins DefaultValuedAttr<I64Attr, "0">:$hint_val, | let arguments = (ins DefaultValuedOptionalAttr<I64Attr, "0">:$hint_val, | ||||
OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | OptionalAttr<MemoryOrderKindAttr>:$memory_order_val); | ||||
let regions = (region SizedRegion<1>:$region); | let regions = (region SizedRegion<1>:$region); | ||||
let assemblyFormat = [{ | let assemblyFormat = [{ | ||||
oilist(`memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | oilist(`memory_order` `(` custom<ClauseAttr>($memory_order_val) `)` | ||||
|`hint` `(` custom<SynchronizationHint>($hint_val) `)`) | |`hint` `(` custom<SynchronizationHint>($hint_val) `)`) | ||||
$region attr-dict | $region attr-dict | ||||
}]; | }]; | ||||
let hasRegionVerifier = 1; | let hasRegionVerifier = 1; | ||||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |