Commit Graph

203 Commits

Author SHA1 Message Date
Billy Zhu
6f6336858e [MLIR][LLVM] Add DebugNameTableKind to DICompileUnit (#87974)
Add the DebugNameTableKind field to DICompileUnit, along with its
importer & exporter.
2024-04-09 06:18:07 -07:00
Christian Ulmann
4095a326c0 [MLIR][LLVM] Add extraData field to the DIDerivedType attribute (#85935)
This commit extends the DIDerivedTypeAttr with the `extraData` field.
For now, the type of it is limited to be a `DINodeAttr`, as extending
the debug metadata handling to support arbitrary metadata nodes does not
seem to be necessary so far.
2024-03-20 16:08:38 +01:00
Billy Zhu
1e8dad3bef [MLIR][LLVM] Support Recursive DITypes (#80251)
Following the discussion from [this
thread](https://discourse.llvm.org/t/handling-cyclic-dependencies-in-debug-info/67526/11),
this PR adds support for recursive DITypes.

This PR adds:
1. DIRecursiveTypeAttrInterface: An interface that DITypeAttrs can
implement to indicate that it supports recursion. See full description
in code.
2. Importer & exporter support (The only DITypeAttr that implements the
interface is DICompositeTypeAttr, so the exporter is only implemented
for composites too. There will be two methods that each llvm DI type
that supports mutation needs to implement since there's nothing
general).

---------

Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>
2024-03-15 09:58:25 -07:00
Edgar
3714f937b8 [MLIR] Add llvm (debug) attributes to CAPI (#83992)
This PR adds the following to the mlir c api:

- The disctinct mlir builtin attribute.
- LLVM attributes (mostly debug related ones)
2024-03-07 18:10:46 +01:00
Peiming Liu
56d58295dd [mlir][sparse] Introduce batch level format. (#83082) 2024-02-26 16:08:28 -08:00
Markus Böck
d9e4309b45 [mlir][NFC] Fix format specifier warning on Windows
`%ld` specifier is defined to work on values of type `long`. The parameter given to `fprintf` is of type `intptr_t` whose actual underlying integer type is unspecified. On Unix systems it happens to commonly be `long` but on 64-bit Windows it is defined as `long long`.

The cross-platform way to print a `intptr_t` is to use `PRIdPTR` which expands to the correct format specifier for `intptr_t`. This avoids any undefined behaviour and compiler warnings.
2024-02-23 12:50:33 +01:00
Alex Zinenko
6e20cb5524 [mlir] fix memory leak
Fix a leak of the root operation not being deleted in the recently
introduced transform_interpreter.c.
2024-02-21 13:07:57 +00:00
Oleksandr "Alex" Zinenko
91f1161133 [mlir] expose transform interpreter to Python (#82365)
Transform interpreter functionality can be used standalone without going
through the interpreter pass, make it available in Python.
2024-02-21 11:01:00 +01:00
Oleksandr "Alex" Zinenko
bd8fcf75df [mlir][python] expose LLVMStructType API (#81672)
Expose the API for constructing and inspecting StructTypes from the LLVM
dialect. Separate constructor methods are used instead of overloads for
better readability, similarly to IntegerType.
2024-02-14 15:03:04 +01:00
Yinying Li
e5924d6499 [mlir][sparse] Implement parsing n out of m (#79935)
1. Add parsing methods for block[n, m].
2. Encode n and m with the newly extended 64-bit LevelType enum.
3. Update 2:4 methods names/comments to n:m.
2024-02-08 14:38:42 -05:00
Jie Fu
87ff65b07c [mlir][test] Fix -Wformat in sparse_tensor.c (NFC)
llvm-project/mlir/test/CAPI/sparse_tensor.c:50:43:
error: format specifies type 'unsigned long long' but the argument has type 'MlirSparseTensorLevelType' (aka 'unsigned long') [-Werror,-Wformat]
    fprintf(stderr, "level_type: %llu\n", lvlTypes[l]);
                                 ~~~~     ^~~~~~~~~~~
                                 %lu
1 error generated.
2024-02-06 10:50:34 +08:00
Jie Fu
62838b872f [mlir][test] Fix -Wformat in sparse_tensor.c (NFC)
llvm-project/mlir/test/CAPI/sparse_tensor.c:50:42:
error: format specifies type 'unsigned long' but the argument has type 'MlirSparseTensorLevelType' (aka 'unsigned long long') [-Werror,-Wformat]
   50 |     fprintf(stderr, "level_type: %lu\n", lvlTypes[l]);
      |                                  ~~~     ^~~~~~~~~~~
      |                                  %llu
1 error generated.
2024-02-06 10:11:10 +08:00
Yinying Li
cd481fa827 [mlir][sparse] Change LevelType enum to 64 bit (#80501)
1. C++ enum is set through enum class LevelType : uint_64.
2. C enum is set through typedef uint_64 level_type. It is due to the
limitations in Windows build: setting enum width to ui64 is not
supported in C.
2024-02-05 17:00:52 -05:00
Shenghang Tsai
dc2ce60024 [mlir][CAPI] Add mlirOpOperandGetValue (#75032) 2023-12-11 12:32:21 +01:00
Vitaly Buka
7fb89bfb0f Reapply "[mlir] Add mlirTranslateModuleToLLVMIR to MLIR-C (#73627)" (#73749) (#73751)
Co-authored-by: Edgar <git@edgarluque.com>
2023-11-29 10:59:51 -08:00
Vitaly Buka
4e49358cdc Revert "[mlir] Re-Add mlirTranslateModuleToLLVMIR to MLIR-C (#73627)" (#73749)
Still breaks
https://lab.llvm.org/buildbot/#/builders/5/builds/38743/steps/9/logs/stdio

There is some info on how to reproduce
https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

This reverts commit 5231605559.
2023-11-28 21:05:12 -08:00
Edgar
5231605559 [mlir] Re-Add mlirTranslateModuleToLLVMIR to MLIR-C (#73627)
The test was checking something unrelated to what it controlled so it
failed after that part changed, i removed that.

See https://github.com/llvm/llvm-project/pull/73117
2023-11-28 17:37:11 -08:00
Vitaly Buka
fea023b129 Revert "[mlir] Add mlirTranslateModuleToLLVMIR to MLIR-C (#73117)"
Breaks https://lab.llvm.org/buildbot/#/builders/5/builds/38700

This reverts commit c43c88501e.
2023-11-27 15:09:51 -08:00
Aart Bik
1944c4f76b [mlir][sparse] rename DimLevelType to LevelType (#73561)
The "Dim" prefix is a legacy left-over that no longer makes sense, since
we have a very strict "Dimension" vs. "Level" definition for sparse
tensor types and their storage.
2023-11-27 14:27:52 -08:00
Alex Zinenko
c50972d67e [mlir] fix CAPI/translation.c test
It should not have been checking for irrelevant function injections in
the first place.
2023-11-23 13:37:13 +00:00
Edgar
c43c88501e [mlir] Add mlirTranslateModuleToLLVMIR to MLIR-C (#73117)
Fixes #73008
2023-11-23 12:39:54 +01:00
Oleksandr "Alex" Zinenko
96dadc9fc8 [mlir] support scalable vectors in python bindings (#71050)
The scalable dimension functionality was added to the vector type after
the bindings for it were defined, without the bindings being ever
updated. Fix that.
2023-11-06 13:14:56 +01:00
Jacques Pienaar
e0928abb48 [mlir][c] Add mlirOperationPrintWithState
Enable passing in MlirAsmState optionally (allow for passing in null) to
allow using the more efficient print calling API. The existing print
behavior results in a new AsmState is implicitly created by walking the
parent op and renumbering values. This makes the cost more explicit and
avoidable (by reusing an AsmState).
2023-11-03 16:29:03 -07:00
Christian Ulmann
46edbce454 [MLIR][LLVM] Change CAPI pointer factory to create opaque pointers (#70572)
This commit changes the LLVM dialect's CAPI pointer getters to drop
support for typed pointers. Typed pointers are deprecated and should no
longer be generated.
2023-10-30 12:50:37 +01:00
max
d342843c2b [MLIR][python bindings][fix] invalidate ops after PassManager run 2023-10-20 22:15:58 -05:00
Maksim Levental
bdc3e6cb45 [MLIR][python bindings] invalidate ops after PassManager run (#69746)
Fixes https://github.com/llvm/llvm-project/issues/69730 (also see
https://reviews.llvm.org/D155543).

There are  two things outstanding (why I didn't land before):

1. add some C API tests for `mlirOperationWalk`;
2. potentially refactor how the invalidation in `run` works; the first
version of the code looked like this:
    ```cpp
    if (invalidateOps) {
      auto *context = op.getOperation().getContext().get();
      MlirOperationWalkCallback invalidatingCallback =
          [](MlirOperation op, void *userData) {
            PyMlirContext *context =
                static_cast<PyMlirContext *>(userData);
            context->setOperationInvalid(op);
          };
      auto numRegions =
          mlirOperationGetNumRegions(op.getOperation().get());
      for (int i = 0; i < numRegions; ++i) {
        MlirRegion region =
            mlirOperationGetRegion(op.getOperation().get(), i);
        for (MlirBlock block = mlirRegionGetFirstBlock(region);
             !mlirBlockIsNull(block);
             block = mlirBlockGetNextInRegion(block))
          for (MlirOperation childOp =
                   mlirBlockGetFirstOperation(block);
               !mlirOperationIsNull(childOp);
               childOp = mlirOperationGetNextInBlock(childOp))
            mlirOperationWalk(childOp, invalidatingCallback, context,
                              MlirWalkPostOrder);
      }
    }
    ```
This is verbose and ugly but it has the important benefit of not
executing `mlirOperationEqual(rootOp->get(), op)` for every op
underneath the root op.

Supposing there's no desire for the slightly more efficient but highly
convoluted approach, I can land this "posthaste".
But, since we have eyes on this now, any suggestions or approaches (or
needs/concerns) are welcome.
2023-10-20 20:28:32 -05:00
Yinying Li
d4088e7d5f [mlir][sparse] Populate lvlToDim (#68937)
Updates:
1. Infer lvlToDim from dimToLvl
2. Add more tests for block sparsity
3. Finish TODOs related to lvlToDim, including adding lvlToDim to python
binding

Verification of lvlToDim that user provides will be implemented in the
next PR.
2023-10-17 16:09:39 -04:00
Yinying Li
256ac4619b [mlir][sparse] Change tests to use new syntax for ELL and slice (#67569)
Examples:

1. `#ELL = #sparse_tensor.encoding<{ lvlTypes = [ "dense", "dense",
"compressed" ], dimToLvl = affine_map<(i,j)[c] -> (c*4*i, i, j)>
}>`
to
`#ELL = #sparse_tensor.encoding<{ map = [s0](d0, d1) -> (d0 * (s0 * 4) :
dense, d0 : dense, d1 : compressed)
}>`

2. `#CSR_SLICE = #sparse_tensor.encoding<{ lvlTypes = [ "dense",
"compressed" ], dimSlices = [ (1, 4, 1), (1, 4, 2) ]
}>`
to
`#CSR_SLICE = #sparse_tensor.encoding<{ map = (d0 :
#sparse_tensor<slice(1, 4, 1)>, d1 : #sparse_tensor<slice(1, 4, 2)>) ->
(d0 : dense, d1 : compressed)
}>`
2023-09-27 19:40:52 -04:00
Mehdi Amini
7675f541f7 [MLIR] Introduce new C bindings to differentiate between discardable and inherent attributes (#66332)
This is part of the transition toward properly splitting the two groups.
This only introduces new C APIs, the Python bindings are unaffected. No
API is removed.
2023-09-26 01:53:17 -07:00
Aart Bik
836411b99f [mlir][sparse] add lvlToDim field to sparse tensor encoding (#67194)
Note the new surface syntax allows for defining a dimToLvl and lvlToDim
map at once (where usually the latter can be inferred from the former,
but not always). This revision adds storage for the latter, together
with some intial boilerplate. The actual support (inference, validation,
printing, etc.) is still TBD of course.
2023-09-22 15:51:25 -07:00
Jacques Pienaar
31ebe98e48 [mlir][c] Expose AsmState. (#66693)
Enable usage where capturing AsmState is good (e.g., avoiding creating AsmState over and over again when walking IR and printing).

This also only changes one C API to verify plumbing. But using the AsmState makes the cost more explicit than the flags interface (which hides the traversals and construction here) and also enables a more efficient usage C side.
2023-09-18 20:12:12 -07:00
Stella Laurenzo
f66cd9e955 [mlir] Add Python bindings for DenseResourceElementsAttr. (#66319)
Only construction and type casting are implemented. The method to create
is explicitly named "unsafe" and the documentation calls out what the
caller is responsible for. There really isn't a better way to do this
and retain the power-user feature this represents.
2023-09-14 18:45:29 -07:00
Stella Laurenzo
7055df7b4f [mlir] Make it possible to build a DenseResourceElementsAttr from untyped memory. (#66009)
Exposes the existing `get(ShapedType, StringRef, AsmResourceBlob)`
builder publicly (was protected) and adds a CAPI
`mlirUnmanagedDenseBlobResourceElementsAttrGet`.

While such a generic construction interface is a big help when it comes
to interop, it is also necessary for creating resources that don't have
a standard C type (i.e. f16, the f8s, etc).

Previously reviewed/approved as part of https://reviews.llvm.org/D157064
2023-09-11 14:10:03 -07:00
Jie Fu
998f3e71c8 [mlir] Fix -Wcast-qual in mlir/test/CAPI/ir.c after D153911 (NFC)
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1120:18: error: cast from 'const void *' to 'unsigned char *' drops const qualifier [-Werror,-Wcast-qual]
      (uint8_t *)mlirDenseElementsAttrGetRawData(uint8Elements);
                 ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1121:35: error: cast from 'const void *' to 'signed char *' drops const qualifier [-Werror,-Wcast-qual]
  int8_t *int8RawData = (int8_t *)mlirDenseElementsAttrGetRawData(int8Elements);
                                  ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1123:19: error: cast from 'const void *' to 'unsigned int *' drops const qualifier [-Werror,-Wcast-qual]
      (uint32_t *)mlirDenseElementsAttrGetRawData(uint32Elements);
                  ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1125:18: error: cast from 'const void *' to 'int *' drops const qualifier [-Werror,-Wcast-qual]
      (int32_t *)mlirDenseElementsAttrGetRawData(int32Elements);
                 ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1127:19: error: cast from 'const void *' to 'unsigned long long *' drops const qualifier [-Werror,-Wcast-qual]
      (uint64_t *)mlirDenseElementsAttrGetRawData(uint64Elements);
                  ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1129:18: error: cast from 'const void *' to 'long long *' drops const qualifier [-Werror,-Wcast-qual]
      (int64_t *)mlirDenseElementsAttrGetRawData(int64Elements);
                 ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1130:34: error: cast from 'const void *' to 'float *' drops const qualifier [-Werror,-Wcast-qual]
  float *floatRawData = (float *)mlirDenseElementsAttrGetRawData(floatElements);
                                 ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1132:17: error: cast from 'const void *' to 'double *' drops const qualifier [-Werror,-Wcast-qual]
      (double *)mlirDenseElementsAttrGetRawData(doubleElements);
                ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1134:19: error: cast from 'const void *' to 'unsigned short *' drops const qualifier [-Werror,-Wcast-qual]
      (uint16_t *)mlirDenseElementsAttrGetRawData(bf16Elements);
                  ^
/Users/jiefu/llvm-project/mlir/test/CAPI/ir.c:1136:19: error: cast from 'const void *' to 'unsigned short *' drops const qualifier [-Werror,-Wcast-qual]
      (uint16_t *)mlirDenseElementsAttrGetRawData(f16Elements);
                  ^
10 errors generated.
2023-07-19 11:16:55 +08:00
Krzysztof Drewniak
d9e04b0626 [mlir][CAPI] Expose the rest of MLIRContext's constructors
It's recommended practice that people calling MLIR in a loop
pre-create a LLVM ThreadPool and a dialect registry and then
explicitly pass those into a MLIRContext for each compilation.
However, the C API does not expose the functions needed to follow this
recommendation from a project that isn't calling MLIR's C++ dilectly.

Add the necessary APIs to mlir-c, including a wrapper around LLVM's
ThreadPool struct (so as to avoid having to amend or re-export parts
of the LLVM API).

Reviewed By: makslevental

Differential Revision: https://reviews.llvm.org/D153593
2023-07-10 20:17:21 +00:00
River Riddle
a5ef51d786 [mlir] Add support for "promised" interfaces
Promised interfaces allow for a dialect to "promise" the implementation of an interface, i.e.
declare that it supports an interface, but have the interface defined in an extension in a library
separate from the dialect itself. A promised interface is powerful in that it alerts the user when
the interface is attempted to be used (e.g. via cast/dyn_cast/etc.) and the implementation has
not yet been provided. This makes the system much more robust against misconfiguration,
and ensures that we do not lose the benefit we currently have of defining the interface in
the dialect library.

Differential Revision: https://reviews.llvm.org/D120368
2023-06-09 11:30:13 -07:00
Rafael Ubal Tena
db7cc0348c Activate OpenMP translation in MLIR execution engine CAPI.
We've observed that the MLIR Jit Engine fails when the `omp` dialect is used due to a failure to register OpenMP-related translations. This small patch addresses this issue.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D151577
2023-06-05 11:56:50 -07:00
wren romano
76647fce13 [mlir][sparse] Combining dimOrdering+higherOrdering fields into dimToLvl
This is a major step along the way towards the new STEA design.  While a great deal of this patch is simple renaming, there are several significant changes as well.  I've done my best to ensure that this patch retains the previous behavior and error-conditions, even though those are at odds with the eventual intended semantics of the `dimToLvl` mapping.  Since the majority of the compiler does not yet support non-permutations, I've also added explicit assertions in places that previously had implicitly assumed it was dealing with permutations.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D151505
2023-05-30 15:19:50 -07:00
Tobias Hieta
f9008e6366 [NFC][Py Reformat] Reformat python files in mlir subdir
This is an ongoing series of commits that are reformatting our
Python code.

Reformatting is done with `black`.

If you end up having problems merging this commit because you
have made changes to a python file, the best way to handle that
is to run git checkout --ours <yourfile> and then reformat it
with black.

If you run into any problems, post to discourse about it and
we will try to help.

RFC Thread below:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential Revision: https://reviews.llvm.org/D150782
2023-05-26 08:05:40 +02:00
wren romano
a0615d020a [mlir][sparse] Renaming the STEA field dimLevelType to lvlTypes
This commit is part of the migration of towards the new STEA syntax/design.  In particular, this commit includes the following changes:
* Renaming compiler-internal functions/methods:
  * `SparseTensorEncodingAttr::{getDimLevelType => getLvlTypes}`
  * `Merger::{getDimLevelType => getLvlType}` (for consistency)
  * `sparse_tensor::{getDimLevelType => buildLevelType}` (to help reduce confusion vs actual getter methods)
* Renaming external facets to match:
  * the STEA parser and printer
  * the C and Python bindings
  * PyTACO

However, the actual renaming of the `DimLevelType` itself (along with all the "dlt" names) will be handled in a separate commit.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D150330
2023-05-17 14:24:09 -07:00
Mehdi Amini
9fbe3b511b Adopt Properties to store operations inherent Attributes in the Arith dialect
This is part of an on-going migration to adopt Properties inside MLIR.

Differential Revision: https://reviews.llvm.org/D148298
2023-05-02 20:56:31 -07:00
max
5b303f21d3 [MLIR][python bindings] Reimplement replace_all_uses_with on PyValue
Differential Revision: https://reviews.llvm.org/D149261
2023-04-26 14:04:33 -05:00
max
fd527ceff1 Revert "[MLIR][python bindings] implement replace_all_uses_with on PyValue"
This reverts commit 3bab7cb089 because it breaks sanitizers.

Differential Revision: https://reviews.llvm.org/D149188
2023-04-25 15:45:17 -05:00
max
3bab7cb089 [MLIR][python bindings][fix] implement replace_all_uses_with on PyValue
Differential Revision: https://reviews.llvm.org/D148816
2023-04-24 11:17:08 -05:00
max
98fbd9d3f9 [MLIR][python bindings] implement replace_all_uses_with on PyValue
Differential Revision: https://reviews.llvm.org/D148816
2023-04-24 10:08:43 -05:00
wren romano
84cd51bb97 [mlir][sparse] Renaming "pointer/index" to "position/coordinate"
The old "pointer/index" names often cause confusion since these names clash with names of unrelated things in MLIR; so this change rectifies this by changing everything to use "position/coordinate" terminology instead.

In addition to the basic terminology, there have also been various conventions for making certain distinctions like: (1) the overall storage for coordinates in the sparse-tensor, vs the particular collection of coordinates of a given element; and (2) particular coordinates given as a `Value` or `TypedValue<MemRefType>`, vs particular coordinates given as `ValueRange` or similar.  I have striven to maintain these distinctions
as follows:

  * "p/c" are used for individual position/coordinate values, when there is no risk of confusion.  (Just like we use "d/l" to abbreviate "dim/lvl".)

  * "pos/crd" are used for individual position/coordinate values, when a longer name is helpful to avoid ambiguity or to form compound names (e.g., "parentPos").  (Just like we use "dim/lvl" when we need a longer form of "d/l".)

    I have also used these forms for a handful of compound names where the old name had been using a three-letter form previously, even though a longer form would be more appropriate.  I've avoided renaming these to use a longer form purely for expediency sake, since changing them would require a cascade of other renamings.  They should be updated to follow the new naming scheme, but that can be done in future patches.

  * "coords" is used for the complete collection of crd values associated with a single element.  In the runtime library this includes both `std::vector` and raw pointer representations.  In the compiler, this is used specifically for buffer variables with C++ type `Value`, `TypedValue<MemRefType>`, etc.

    The bare form "coords" is discouraged, since it fails to make the dim/lvl distinction; so the compound names "dimCoords/lvlCoords" should be used instead.  (Though there may exist a rare few cases where is is appropriate to be intentionally ambiguous about what coordinate-space the coords live in; in which case the bare "coords" is appropriate.)

    There is seldom the need for the pos variant of this notion.  In most circumstances we use the term "cursor", since the same buffer is reused for a 'moving' pos-collection.

  * "dcvs/lcvs" is used in the compiler as the `ValueRange` analogue of "dimCoords/lvlCoords".  (The "vs" stands for "`Value`s".)  I haven't found the need for it, but "pvs" would be the obvious name for a pos-`ValueRange`.

    The old "ind"-vs-"ivs" naming scheme does not seem to have been sustained in more recent code, which instead prefers other mnemonics (e.g., adding "Buf" to the end of the names for `TypeValue<MemRefType>`).  I have cleaned up a lot of these to follow the "coords"-vs-"cvs" naming scheme, though haven't done an exhaustive cleanup.

  * "positions/coordinates" are used for larger collections of pos/crd values; in particular, these are used when referring to the complete sparse-tensor storage components.

    I also prefer to use these unabbreviated names in the documentation, unless there is some specific reason why using the abbreviated forms helps resolve ambiguity.

In addition to making this terminology change, this change also does some cleanup along the way:
  * correcting the dim/lvl terminology in certain places.
  * adding `const` when it requires no other code changes.
  * miscellaneous cleanup that was entailed in order to make the proper distinctions.  Most of these are in CodegenUtils.{h,cpp}

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D144773
2023-03-06 12:23:33 -08:00
rkayaith
6f5590ca34 [mlir][CAPI] Allow running pass manager on any operation
`mlirPassManagerRun` is currently restricted to running on
`builtin.module` ops, but this restriction doesn't exist on the C++
side. This renames it to `mlirPassManagerRunOnOp` and updates it to take
`MlirOperation` instead of `MlirModule`.

Depends on D143352

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D143354
2023-03-01 18:17:13 -05:00
Tobias Gysi
5dc34eb379 Reland "[mlir][func] Use the generated pass options in func to llvm."
Update the FuncToLLVM pass to use the generated constructors and
the generated pass option struct. The hand written constructor
got out of sync after some refactorings. Using a generated constructor
and options struct ensures the everything remains in sync.

Reviewed By: zero9178

This reverts commit 39da46826d
and relands commit 771d9c05af

which was originally reverted due to
https://lab.llvm.org/buildbot#builders/61/builds/39694

Differential Revision: https://reviews.llvm.org/D143733
2023-02-11 12:29:10 +01:00
Tobias Gysi
39da46826d Revert "[mlir][func] Use the generated pass options in func to llvm."
The commit breaks the mlir-vulkan runner:
https://lab.llvm.org/buildbot#builders/61/builds/39694

This reverts commit 771d9c05af.
2023-02-11 10:42:20 +01:00
Tobias Gysi
771d9c05af [mlir][func] Use the generated pass options in func to llvm.
Update the FuncToLLVM pass to use the generated constructors and
the generated pass option struct. The hand written constructor
got out of sync after some refactorings. Using a generated constructor
and options struct ensures the everything remains in sync.

Reviewed By: zero9178

Differential Revision: https://reviews.llvm.org/D143733
2023-02-11 10:31:19 +01:00