[Mlir-commits] [mlir] [acc] Add attribute for combined constructs (PR #80319)
Valentin Clement バレンタイン クレメン
llvmlistbot at llvm.org
Thu Feb 1 11:50:40 PST 2024
================
@@ -989,7 +1008,8 @@ def OpenACC_ParallelOp : OpenACC_Op<"parallel",
let assemblyFormat = [{
oilist(
- `dataOperands` `(` $dataClauseOperands `:` type($dataClauseOperands) `)`
+ `combined` `(` custom<CombinedConstructs>($combined) `)`
----------------
clementval wrote:
I think we can make the IR less verbose especially for compute operations since they only combined with loop. If you use a UnitAttr, you don't even need a custom parser/printer here.
So the IR would look like:
```
acc.parallel combined ... // we (omit parallel loop) since this is obvious.
```
It will only print the keyword if the UnitAttr is present (I'm not even sure you need the ()?).
```
(`combined` $combined)?
```
I would do the same for serial and kernels.
Also you probably don't want this in the oilist.
https://github.com/llvm/llvm-project/pull/80319
More information about the Mlir-commits
mailing list