#
45daa4fd |
| 17-May-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
[flang][cuda] Move CUDA Fortran operations to a CUF dialect (#92317)
The number of operations dedicated to CUF grew and where all still in
FIR. In order to have a better organization, the CUF opera
[flang][cuda] Move CUDA Fortran operations to a CUF dialect (#92317)
The number of operations dedicated to CUF grew and where all still in
FIR. In order to have a better organization, the CUF operations,
attributes and code is moved into their specific dialect and files. CUF
dialect is tightly coupled with HLFIR/FIR and their types.
The CUF attributes are bundled into their own library since some
HLFIR/FIR operations depend on them and the CUF dialect depends on the
FIR types. Without having the attributes into a separate library there
would be a dependency cycle.
show more ...
|
#
f832beeb |
| 11-Mar-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
[flang][NFC] Use the tablegen definition for FIR dialect (#84822)
FIROpsDialect has been declared manually with a class inheriting from
the MLIR Dialect class. Another declaration is done using tab
[flang][NFC] Use the tablegen definition for FIR dialect (#84822)
FIROpsDialect has been declared manually with a class inheriting from
the MLIR Dialect class. Another declaration is done using tablegen here
`flang/include/flang/Optimizer/Dialect/FIRDialect.td`. This patch merge
the two declaration so we can use the tablegen generated class for all
the FIROpsDialect needs.
This is part of a series of patch to bring FIR up to date with the
current MLIR infra.
show more ...
|
#
137bd782 |
| 13-Feb-2024 |
Slava Zakharin <szakharin@nvidia.com> |
[flang] Register LLVMTranslationDialectInterface for FIR. (#81668)
Register the LLVM IR translation interface for FIR to avoid
warnings about "Unhandled parameter attribute" after #78228.
|
#
369b8221 |
| 07-Feb-2024 |
Vijay Kandiah <vkandiah@nvidia.com> |
[flang] Introducing a method to dynamically and conditionally register dialect interfaces. (#80881)
This change introduces the `addFIRExtensions` method to dynamically and
conditionally register d
[flang] Introducing a method to dynamically and conditionally register dialect interfaces. (#80881)
This change introduces the `addFIRExtensions` method to dynamically and
conditionally register dialect interfaces. As a use case of
`addFIRExtensions`, this change moves the static registration of
`FIRInlinerInterface` out of the constructor of `FIROpsDialect` to be
dynamically registered while loading the necessary MLIR dialects
required by Flang. This registration of `FIRInlinerInterface` is also
guarded by a boolean `addFIRInlinerInterface` which defaults to true.
---------
Co-authored-by: Vijay Kandiah <vkandiah@nvidia.com>
show more ...
|
#
26a0b277 |
| 21-Nov-2023 |
Mehdi Amini <joker.eph@gmail.com> |
Make MLIR Value more consistent in terms of `const` "correctness" (NFC) (#72765)
MLIR can't really be const-correct (it would need a `ConstValue` class
alongside the `Value` class really, like `Arr
Make MLIR Value more consistent in terms of `const` "correctness" (NFC) (#72765)
MLIR can't really be const-correct (it would need a `ConstValue` class
alongside the `Value` class really, like `ArrayRef` and
`MutableArrayRef`). This is however making is more consistent: method
that are directly modifying the Value shouldn't be marked const.
show more ...
|
#
8301e485 |
| 11-Oct-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang][FIR] add FirAliasAnalysisOpInterface (#68317)
This interface allows (HL)FIR passes to add TBAA information to fir.load
and fir.store. If present, these TBAA tags take precedence over those
[flang][FIR] add FirAliasAnalysisOpInterface (#68317)
This interface allows (HL)FIR passes to add TBAA information to fir.load
and fir.store. If present, these TBAA tags take precedence over those
added during CodeGen.
We can't reuse mlir::LLVMIR::AliasAnalysisOpInterface because that uses
the mlir::LLVMIR namespace so it tries to define methods for fir
operations in the wrong namespace. But I did re-use the tbaa tag type to
minimise boilerplate code.
The new builders are to preserve the old interface without the tbaa tag.
show more ...
|
#
231a6959 |
| 22-May-2023 |
Andrew Gozillon <Andrew.Gozillon@amd.com> |
Revert "Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect""
This reverts commit aa6b47cdaf3cddc70b7af33c1edbda502ecb3d05.
And adds a fix (adding mi
Revert "Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect""
This reverts commit aa6b47cdaf3cddc70b7af33c1edbda502ecb3d05.
And adds a fix (adding missing libraries to CMakeLists.txt for the OpenMPDialect) that allows failing builds to succeed.
show more ...
|
#
aa6b47cd |
| 22-May-2023 |
Andrew Gozillon <Andrew.Gozillon@amd.com> |
Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect"
This reverts commit 95b0b867b0d19919133693b8e75b170fd25a9cec.
Revert until fix found for certain
Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect"
This reverts commit 95b0b867b0d19919133693b8e75b170fd25a9cec.
Revert until fix found for certain failing buildbots
show more ...
|
#
95b0b867 |
| 22-May-2023 |
Andrew Gozillon <Andrew.Gozillon@amd.com> |
[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect
This attribute represents the OpenMP declare target directive, it marks a function or global as declare ta
[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect
This attribute represents the OpenMP declare target directive, it marks a function or global as declare target by being present but also contains information on the device_type and capture clause (link or to). It being an attribute allows it to mark existing constructs and be converted trivially on lowering from the OpenMP dialect to MLIR using amendOperation.
An interface has been made for the declare target attribute, with several helper methods for managing the attribute, this interface can be applied to MLIR operations that are allowed to be marked as declare target (as an example, it is by default applied to func.func, LLVMFunc, fir.GlobalOps and LLVMGlobalOps).
Reviewers: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D150328
show more ...
|
#
4d67b278 |
| 08-Jan-2023 |
Jeff Niu <jeff@modular.com> |
[mlir] Add operations to BlockAndValueMapping and rename it to IRMapping
The patch adds operations to `BlockAndValueMapping` and renames it to `IRMapping`. When operations are cloned, old operations
[mlir] Add operations to BlockAndValueMapping and rename it to IRMapping
The patch adds operations to `BlockAndValueMapping` and renames it to `IRMapping`. When operations are cloned, old operations are mapped to the cloned operations. This allows mapping from an operation to a cloned operation. Example:
``` Operation *opWithRegion = ... Operation *opInsideRegion = &opWithRegion->front().front();
IRMapping map Operation *newOpWithRegion = opWithRegion->clone(map); Operation *newOpInsideRegion = map.lookupOrNull(opInsideRegion); ```
Migration instructions: All includes to `mlir/IR/BlockAndValueMapping.h` should be replaced with `mlir/IR/IRMapping.h`. All uses of `BlockAndValueMapping` need to be renamed to `IRMapping`.
Reviewed By: rriddle, mehdi_amini
Differential Revision: https://reviews.llvm.org/D139665
show more ...
|
#
092601d4 |
| 03-Mar-2022 |
Andrzej Warzynski <andrzej.warzynski@arm.com> |
[flang] Remove 'using namespace mlir;` from header files
Currently, CGOps.h and FIROps.h contain `using namespace mlir;`. Every file that includes one of these header files (directly and transitivel
[flang] Remove 'using namespace mlir;` from header files
Currently, CGOps.h and FIROps.h contain `using namespace mlir;`. Every file that includes one of these header files (directly and transitively) will have the MLIR namespace enabled. With name-clashes within sub-projects (LLVM and MLIR, MLIR and Flang), this is not desired. Also, it is not possible to "un-use" a namespace once it is "used". Instead, we should try to limit `using namespace` to implementation files (i.e. *.cpp).
This patch removes `using namespace mlir;` from header files and adjusts other files accordingly. In header and TableGen files, extra namespace qualifier is added when referring to symbols defined in MLIR. Similar approach is adopted in source files that didn't require many changes. In files that would require a lot of changes, `using namespace mlir;` is added instead.
Differential Revision: https://reviews.llvm.org/D120897
show more ...
|
#
23aa5a74 |
| 26-Feb-2022 |
River Riddle <riddleriver@gmail.com> |
[mlir] Rename the Standard dialect to the Func dialect
The last remaining operations in the standard dialect all revolve around FuncOp/function related constructs. This patch simply handles the init
[mlir] Rename the Standard dialect to the Func dialect
The last remaining operations in the standard dialect all revolve around FuncOp/function related constructs. This patch simply handles the initial renaming (which by itself is already huge), but there are a large number of cleanups unlocked/necessary afterwards:
* Removing a bunch of unnecessary dependencies on Func * Cleaning up the From/ToStandard conversion passes * Preparing for the move of FuncOp to the Func dialect
See the discussion at https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061
Differential Revision: https://reviews.llvm.org/D120624
show more ...
|
#
6da728ad |
| 10-Feb-2022 |
Valentin Clement <clementval@gmail.com> |
[flang] Add FIRInlinerInterface
This patch introduces the FIRInlinerInterface. This class defines the interface for handling inlining of FIR calls.
This patch is part of the upstreaming effort from
[flang] Add FIRInlinerInterface
This patch introduces the FIRInlinerInterface. This class defines the interface for handling inlining of FIR calls.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D119340
Co-authored-by: Jean Perier <jperier@nvidia.com>
show more ...
|
#
31bb8efd |
| 11-Mar-2021 |
River Riddle <riddleriver@gmail.com> |
[mlir][StorageUniquer] Properly call the destructor on non-trivially destructible storage instances
This allows for storage instances to store data that isn't uniqued in the context, or contain othe
[mlir][StorageUniquer] Properly call the destructor on non-trivially destructible storage instances
This allows for storage instances to store data that isn't uniqued in the context, or contain otherwise non-trivial logic, in the rare situations that they occur. Storage instances with trivial destructors will still have their destructor skipped. A consequence of this is that the storage instance definition must be visible from the place that registers the type.
Differential Revision: https://reviews.llvm.org/D98311
show more ...
|
#
0b785a46 |
| 25-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][fir] Add remaining Ops. Updates to pre-existing Ops.
- add ops: rebox, insert_on_range, absent, is_present - embox, coordinate_of: replace old hand-written parser/pretty-printer with ass
[flang][fir] Add remaining Ops. Updates to pre-existing Ops.
- add ops: rebox, insert_on_range, absent, is_present - embox, coordinate_of: replace old hand-written parser/pretty-printer with assembly format - remove dead floating point ops, since buitlins work for all types - update call op - update documentation - misc. NFC to formatting - add op round trip tests
Authors: Eric Schweitz, Jean Perier, Zachary Selk, Kiran Chandramohan, et.al.
Differential Revision: https://reviews.llvm.org/D97500
show more ...
|
#
082ec3ab |
| 25-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][fir][NFC] Remove dead code.
This patch removes OpaqueAttr as it is no longer used.
Differential Revision: https://reviews.llvm.org/D97424
|
#
399c3d5b |
| 05-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][fir] Add shape, shape_shift, and slice types.
Adding the FIR types used to describe the Fortran semantics of indexing FIR arrays.
https://github.com/flang-compiler/f18-llvm-project/pull/267
[flang][fir] Add shape, shape_shift, and slice types.
Adding the FIR types used to describe the Fortran semantics of indexing FIR arrays.
https://github.com/flang-compiler/f18-llvm-project/pull/267
Differential Revision: https://reviews.llvm.org/D96172
show more ...
|
#
2cd0a113 |
| 08-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][fir] Add OpaqueAttr.
Add the opaque attribute class used in flang.
https://github.com/flang-compiler/f18-llvm-project/pull/402
Differential Revision: https://reviews.llvm.org/D96293
|
#
f6342806 |
| 05-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][fir] Add FIR's vector type.
This patch adds support for `!fir.vector`, a rank one, constant length data type.
https://github.com/flang-compiler/f18-llvm-project/pull/413
Differential Revis
[flang][fir] Add FIR's vector type.
This patch adds support for `!fir.vector`, a rank one, constant length data type.
https://github.com/flang-compiler/f18-llvm-project/pull/413
Differential Revision: https://reviews.llvm.org/D96162
show more ...
|
#
9673a009 |
| 04-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang] Remove dims type and gendims op.
These are no longer part of FIR. https://github.com/flang-compiler/f18-llvm-project/pull/267
Differential Revision: https://reviews.llvm.org/D96077
|
#
ae7e8428 |
| 04-Feb-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][NFC] Rename IntType to IntegerType.
https://github.com/flang-compiler/f18-llvm-project/pull/413
Differential Revision: https://reviews.llvm.org/D96072
|
#
59186902 |
| 30-Jan-2021 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang][NFC] Rename complex type.
This change renames the CplxType class to ComplexType.
|
#
82fd1392 |
| 07-Aug-2020 |
River Riddle <riddleriver@gmail.com> |
[flang] Update FirOpsDialect constructor to pass its TypeID
|
#
bc034238 |
| 24-Apr-2020 |
Eric Schweitz <eschweitz@nvidia.com> |
[flang] Upstream recent work on FIR to llvm-project.
Summary:
Reviewers: DavidTruby, sscalpone, jeanPerier
Subscribers: mgorny, aartbik, llvm-commits
Tags: #llvm
Differential Revision: https://r
[flang] Upstream recent work on FIR to llvm-project.
Summary:
Reviewers: DavidTruby, sscalpone, jeanPerier
Subscribers: mgorny, aartbik, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78835
show more ...
|
#
1f879005 |
| 29-Mar-2020 |
Tim Keith <tkeith@nvidia.com> |
[flang] Reformat with latest clang-format and .clang-format
Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
|