aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorSergio Afonso <safonsof@amd.com>2024-06-12 13:26:27 +0100
committerGitHub <noreply@github.com>2024-06-12 13:26:27 +0100
commit3c9a9c736532ea1ed997aae069c516b2564c3235 (patch)
tree4b697277ce95edd9dee4ab7253cf017e179e8259 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent91175313d46de73ca45f37a6a5fb4f1b3bb16035 (diff)
downloadllvm-3c9a9c736532ea1ed997aae069c516b2564c3235.zip
llvm-3c9a9c736532ea1ed997aae069c516b2564c3235.tar.gz
llvm-3c9a9c736532ea1ed997aae069c516b2564c3235.tar.bz2
[MLIR][OpenMP] Support clause-based representation of operations (#92519)
Currently, OpenMP operations are defined independently of each other. However, one property of the OpenMP specification is that many clauses can be applied to multiple constructs. Keeping the MLIR representation of clauses consistent across all operations that can accept them is important, but since this information is scattered into multiple operation definitions, it is currently prone to divergence as new features and changes are added to the dialect. Furthermore, centralizing this information allows for a single source of truth and avoids redundancy in the dialect. The proposal in this patch is to make OpenMP clauses independent top level definitions which can then be passed in a template argument list to OpenMP operation definitions, just as it's done for traits. Clauses can define these properties, which are joined together in order to make a default initialization for the fields of the same name of the OpenMP operation: - `traits`: Optional. It gets added to the list of traits of the operation. - `arguments`: Mandatory. It defines how the clause is represented. - `assemblyFormat`: Optional (though it should almost always be defined). This is the declarative definition of the printer/parser for the `arguments`. How these are combined depends on whether this is an optional or required clause. - `description`: Optional. It's used to populate a `clausesDescription` field, so each operation definition must still define a `description` itself. That field is intended to be appended to the end of the `OpenMP_Op`'s `description`. - `extraClassDeclaration`: Optional. It can define some C++ code to be added to every OpenMP operation that includes that clause. In order to give operation definitions fine-grained control over features of a certain clause might need to be inhibited, the `OpenMP_Clause` class takes "skipTraits", "skipArguments", "skipAssemblyFormat", "skipDescription" and "skipExtraClassDeclaration" bit template arguments. These are intended to be used very sparingly for cases where some of the clauses might collide in some way otherwise.
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions