This revision removes the metadata op, that to the best of our
knowledge, has no more uses after switching to a purely attribute based
metadata representation:
https://reviews.llvm.org/D155444https://reviews.llvm.org/D155285https://reviews.llvm.org/D155159
These changes got unlocked after landing distinct attribute support:
https://reviews.llvm.org/D153360,
which enables modeling distinct metadata using attributes. As a result,
all metadata kinds are now represented using attributes. Previously,
there has been a mix of attribute and op based representations.
Having attribute only metadata makes it possible to update the metadata
in-parallel, while updating the global metadata operation has been
a sequential process. The LLVM Dialect inliner already benefits from
this change and now creates new alias scopes and domains during
inlining rather than dropping the no alias information:
https://reviews.llvm.org/D155712
Reviewed By: Dinistro
Differential Revision: https://reviews.llvm.org/D156217
Using MLIR attributes instead of metadata has many advantages:
* No indirection: Attributes can simply refer to each other seemlessly without having to use the indirection of `SymbolRefAttr`. This also gives us correctness by construction in a lot of places as well
* Multithreading safe: The Attribute infrastructure gives us thread-safety for free. Creating operations and inserting them into a block is not thread-safe. This is a major use case for e.g. the inliner in MLIR which runs in parallel
* Easier to create: There is no need for a builder or a metadata region
This patch therefore does exactly that. It leverages the new distinct attributes to create distinct access groups in a deterministic and threadsafe manner.
Differential Revision: https://reviews.llvm.org/D155285
This commit introduces support for locations as part of the loop
annotation attribute. These locations indicate the start and the end of
the loop.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D149858
The revision consistently uses the AliasAnalysisOp and AccessGroupOp
interfaces in the translation from MLIR to LLVMIR. It thus drops the
last string based lookups of alias scope and access group attributes.
Depends on D144851
Reviewed By: Dinistro
Differential Revision: https://reviews.llvm.org/D145037
This commit moves the access group translation into the
LoopAnnotationTranslation class as these two metadata kinds only appear
together.
Drops the access group cleanup from `ModuleTranslation::forgetMapping`
as this is only used on function regions. Access groups only appear in the
region of a global metadata operation and will thus not be cleaned here.
Analogous to https://reviews.llvm.org/D143577
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D144253
This commit introduces a structured representation of loop metadata to
the LLVM dialect. This attribute explicitly models all known `!llvm.loop`
metadata fields and groups them by introducing nested attributes for each
namespace.
The new attribute replaces the LoopOptionAttr that could only model a
limited subset of loop metadata.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D143064