diff options
author | Sergio Afonso <safonsof@amd.com> | 2024-09-13 12:57:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 12:57:41 +0100 |
commit | 6568062ff1821f561c834f9f216fba0293e6f1c4 (patch) | |
tree | a1a1690c69347f84e3ff84734fd64e2809fbc542 /llvm/unittests/CodeGen/MachineInstrTest.cpp | |
parent | 8e10a3f80e264aaa186ab3cc74fea840f453c66d (diff) | |
download | llvm-6568062ff1821f561c834f9f216fba0293e6f1c4.zip llvm-6568062ff1821f561c834f9f216fba0293e6f1c4.tar.gz llvm-6568062ff1821f561c834f9f216fba0293e6f1c4.tar.bz2 |
[MLIR][OpenMP] Improve assemblyFormat handling for clause-based ops (#108023)
This patch modifies the representation of `OpenMP_Clause` to allow
definitions to incorporate both required and optional arguments while
still allowing operations including them and overriding the
`assemblyFormat` to take advantage of automatically-populated format
strings.
The proposed approach is to split the `assemblyFormat` clause property
into `reqAssemblyFormat` and `optAssemblyFormat`, and remove the
`isRequired` template and associated `required` property. The
`OpenMP_Op` class, in turn, populates the new `clausesReqAssemblyFormat`
and `clausesOptAssemblyFormat` properties in addition to
`clausesAssemblyFormat`. These properties can be used by clause-based
OpenMP operation definitions to reconstruct parts of the
clause-inherited format string in a more flexible way when overriding
it.
Clause definitions are updated to follow this new approach and some
operation definitions overriding the `assemblyFormat` are simplified by
taking advantage of the improved flexibility, reducing code duplication.
The `verify-openmp-ops` tablegen pass is updated for the new
`OpenMP_Clause` representation.
Some MLIR and Flang unit tests had to be updated due to changes to the
default printing order of clauses on updated operations.
Diffstat (limited to 'llvm/unittests/CodeGen/MachineInstrTest.cpp')
0 files changed, 0 insertions, 0 deletions