100 Commits

Author SHA1 Message Date
Maksim Levental
1cec5fffd8
[mlir] implement -verify-diagnostics=only-expected (#135131)
This PR implements `verify-diagnostics=only-expected` which is a "best
effort" verification - i.e., `unexpected`s and `near-misses` will not be
considered failures. The purpose is to enable narrowly scoped checking
of verification remarks (just as we have for lit where only a subset of
lines get `CHECK`ed).
2025-04-10 18:50:00 -04:00
Matthias Springer
213917be82
[mlir][bufferization] Remove buffer-deallocation pass (#126366)
The `-buffer-deallocation` pass is not compatible with One-Shot
Bufferize and has been replaced with the Ownership-based Buffer
Deallocation pass about 1.5 years ago. To clean up the code base, this
commit removes the deprecated `buffer-deallocation` pass. All uses of
this deprecated pass within MLIR have already been migrated.

Note for LLVM integration: If you depend on this pass, migrate to the
Ownership-based Buffer Deallocation pass or copy the pass to your
codebase. For details, see
https://discourse.llvm.org/t/psa-bufferization-new-buffer-deallocation-pipeline/73375.
2025-02-13 09:49:16 +01:00
Christopher Bate
1a70420ff3
[mlir] Attempt to resolve edge cases in PassPipeline textual format (#118877)
This commit makes the following changes:

1. Previously certain pipeline options could cause the options parser to
   get stuck in an an infinite loop. An example is:

   ```
mlir-opt %s -verify-each=false
-pass-pipeline='builtin.module(func.func(test-options-super-pass{list={list=1,2},{list=3,4}}))''
   ```

   In this example, the 'list' option of the `test-options-super-pass`
   is itself a pass options specification (this capability was added in
   https://github.com/llvm/llvm-project/issues/101118).

However, while the textual format allows `ListOption<int>` to be given
   as `list=1,2,3`, it did not allow the same format for
   `ListOption<T>` when T is a subclass of `PassOptions` without extra
enclosing `{....}`. Lack of enclosing `{...}` would cause the infinite
   looping in the parser.

   This change resolves the parser bug and also allows omitting the
   outer `{...}` for `ListOption`-of-options.

2. Previously, if you specified a default list value for your
`ListOption`, e.g. `ListOption<int> opt{*this, "list",
llvm:🆑:list_init({1,2,3})}`,
it would be impossible to override that default value of `{1,2,3}` with
an *empty* list on the command line, since `my-pass{list=}` was not
allowed.

This was not allowed because of ambiguous handling of lists-of-strings
   (no literal marker is currently required).

   This change makes it explicit in the ListOption construction that we
would like to treat all ListOption as having a default value of "empty"
   unless otherwise specified (e.g. using `llvm::list_init`).

It removes the requirement that lists are not printed if empty. Instead,
   lists are not printed if they do not have their default value.

   It is now clarified that the textual format
   `my-pass{string-list=""}` or `my-pass{string-list={}}`
   is interpreted as "empty list". This makes it imposssible to specify
   that ListOption `string-list` should be a size-1 list containing the
   empty string. However, `my-pass{string-list={"",""}}` *does* specify
a size-2 list containing the empty string. This behavior seems
preferable
   to allow for overriding non-empty defaults as described above.
2024-12-17 21:13:29 -07:00
Billy Zhu
5b21fd298c
[MLIR][Pass] Full & deterministic diagnostics (#110311)
Today, when the pass infra schedules a pass/nested-pipeline on a set of
ops, it exits early as soon as it fails on one of the ops. This leads to
non-exhaustive, and more importantly, non-deterministic error reporting
(under async).

This PR removes the early termination behavior so that all ops have a
chance to run through the current pass/nested-pipeline, and all errors
are reported (async diagnostics are already ordered). This guarantees
deterministic & full error reporting. As a result, it's also no longer
necessary to -split-input-file with one error per split when testing
with -verify-diagnostics.
2024-10-01 19:07:52 -07:00
wang-y-z
041b0a81b0
[MLIR][Operation] Fix isBeforeInBlock crash bug mentioned in https://github.com/llvm/llvm-project/issues/60909 (#101172)
# summary
This MR fix `isBeforeInBlock` crash bug mentioned in
https://github.com/llvm/llvm-project/issues/60909. Fixes #60909.
# Trigger condition
1. A block only have one operation.
2. `block->isOpOrderValid()` is true, but `op->hasValidOrder()` is
false.
3. call: `op->isBeforeInBlock(op)`, compared with op itself.

Will crash on `assert(blockFront != blockBack && "expected more than one
operation");`

# Case study
Simplified repro case in
`mlir/test/Pass/scf2cf-print-liveness-crash.mlir`
When put `-convert-scf-to-cf -test-print-liveness` together in one cmd
line, the first pass will work normally and crash on the second pass.
Details please refer  https://github.com/llvm/llvm-project/issues/60909

# Solutions
option1. in `isBeforeInBlock`, check if block only have one operation
before step into `updateOrderIfNecessary`, if have only one, it must
return false
option2. in `isBeforeInBlock`, check if `this == other`, if true return
false
option3. fix `addNodeToList` logic

I prefer option3: 

When a block contains only one operation and the user calls
op->isBeforeInBlock(op), if block->isOpOrderValid() returns true,
updateOrderIfNecessary is called. If op->hasValidOrder() is false, it
will crash at the assertion assert(blockFront != blockBack && "expected
more than one operation");.

This behavior is abnormal and needs fixing. I discovered that after the
first pass of `-convert-scf-to-cf`, there is a block with only one
operation where the block order is valid but the operation order is
invalid, leading to a crash when `-test-print-liveness` pass runs.

---------

Co-authored-by: isaacw <isaacw@nvidia.com>
2024-09-21 23:40:52 +08:00
Nikhil Kalra
165c6d1251
[mlir] Add support for parsing nested PassPipelineOptions (#101118)
- Added a default parsing implementation to `PassOptions` to allow
`Option`/`ListOption` to wrap PassOption objects. This is helpful when
creating meta-pipelines (pass pipelines composed of pass pipelines).
- Updated `ListOption` printing to enable round-tripping the output of
`dump-pass-pipeline` back into `mlir-opt` for more complex structures.
2024-08-09 13:54:00 -07:00
Nikhil Kalra
27bb2a3640
[mlir][Pass] Handle escaped pipline option values (#97667)
The PassRegistry parser properly handles escape tokens (', ", {}) when
parsing pass options from string but then does not strip the escape
tokens when providing the values back to the caller.

This change updates the parser such that escape tokens are properly
removed and whitespace is trimmed when extracting option values.
2024-07-05 09:49:34 +02:00
Mehdi Amini
a506279e5c
[mlir] Do not merge blocks during canonicalization by default (#95057)
This is a heavy process, and it can trigger a massive explosion in
adding block arguments. While potentially reducing the code size, the
resulting merged blocks with arguments are hiding some of the def-use
chain and can even hinder some further analyses/optimizations: a merge
block does not have it's own path-sensitive context, instead the context
is merged from all the predecessors.

Previous behavior can be restored by passing:

  {test-convergence region-simplify=aggressive}

to the canonicalize pass.
2024-06-14 22:38:56 +02:00
Christopher Bate
9ad5da2def
[mlir][Pass] Add new FileTreeIRPrinterConfig (#67840)
This change expands the existing instrumentation that prints the IR
before/after each pass to an output stream (usually stderr). It adds
a new configuration that will print the output of each pass to a
separate file. The files will be organized into a directory tree
rooted at a specified directory. For existing tools, a CL option
`-mlir-print-ir-tree-dir` is added to specify this directory and
activate the new printing config.

The created directory tree mirrors the nesting structure of the IR. For
example,
if the IR is congruent to the pass-pipeline
"builtin.module(pass1,pass2,func.func(pass3,pass4),pass5)", and
`-mlir-print-ir-tree-dir=/tmp/pipeline_output`, then then the tree file
tree
created will look like:

```
/tmp/pass_output
├── builtin_module_the_symbol_name
│   ├── 0_pass1.mlir
│   ├── 1_pass2.mlir
│   ├── 2_pass5.mlir
│   ├── func_func_my_func_name
│   │   ├── 1_0_pass3.mlir
│   │   ├── 1_1_pass4.mlir
│   ├── func_func_my_other_func_name
│   │   ├── 1_0_pass3.mlir
│   │   ├── 1_1_pass4.mlir
```

The subdirectories are named by concatenating the relevant parent
operation names and symbol name (if present). The printer keeps a
counter associated with ops that are targeted by passes and their
isolated-from-above parents. Each filename is given a numeric prefix
using the counter value for the op that the pass is targeting and then
prepending the counter values for each parent. This gives a naming
where it is easy to distinguish which passes may have run concurrently
vs. which have a clear ordering. In the above example, for both
`1_1_pass4.mlir` files, the first `1` refers to the counter for the
parent op, and the second refers to the counter for the respective
function.
2024-05-24 10:01:48 -06:00
Hsiangkai Wang
362aa434cc
[mlir] Enhance TimingManager Printing Flexibility (#85821)
Revise the printing functionality of TimingManager to accommodate
various output formats. At present, TimingManager is limited to
outputting data solely in plain text format. To overcome this
limitation, I have introduced an abstract class that serves as the
foundation for printing. This approach allows users to implement
additional output formats by extending this abstract class. As part of
this update, I have integrated support for JSON as a new output format,
enhancing the ease of parsing for subsequent processing scripts.
2024-04-03 16:58:01 +01:00
Puyan Lotfi
03e29a49d9
[mlir][Pass] Enable the option for reproducer generation without crashing (#75421)
This PR adds API `makeReproducer` and cl::opt flag
`--mlir-generate-reproducer=<filename>` in order to allow for mlir
reproducer dumps even when the pipeline doesn't crash.

This PR also decouples the code that handles generation of an MLIR
reproducer from the crash recovery portion. The purpose is to allow for
generating reproducers outside of the context of a compiler crash.

This will be useful for frameworks and runtimes that use MLIR where it
is needed to reproduce the pipeline behavior for reasons outside of
diagnosing crashes. An example is for diagnosing performance issues
using offline tools, where being able to dump the reproducer from a
runtime compiler would be helpful.
2024-01-03 12:36:43 -05:00
Antonio Cortes Perez
f33afea260
[mlir] Add an Observer for profiling actions to a stream. (#67251)
The profile is stored in the Chrome trace event format.

Added the --profile-action-to=<file> option to mlir-opt.
2023-10-02 20:07:10 -07:00
Christian Sigg
710b5a1232
Fix logic to detect cl::option equality. (#65754)
This is a new attempt of https://reviews.llvm.org/D159481, this time as
GitHub PR.

`GenericOptionValue::compare()` should return `true` for a match.

- `OptionValueBase::compare()` always returns `false` and shouldn't
match anything.
- `OptionValueCopy::compare()` returns `false` if not `Valid` which
corresponds to no match.

Also adding some tests.
2023-09-10 12:25:19 +02:00
Matthias Springer
87da4b6fa6 [mlir][Pass] Check supported op types before running a pass
Add extra error checking to prevent passes from being run on unsupported ops through the pass manager infrastructure.

Differential Revision: https://reviews.llvm.org/D153144
2023-06-20 14:40:11 +02:00
Mehdi Amini
7f00ba08aa Restore mlir-opt --run-reproducer option to opt-in running a reproducer
When tooling out there produces a reproducer that is archived, the first thing
a user is likely to expect is to process this as they do with any MLIR file.
However https://reviews.llvm.org/D126447 changed the behavior of mlir-opt to
eliminate the `--run-reproducer` option and instead automatically run it when
present in the input file. This creates a discrepancy in how mlir-opt behaves
when fed with an input file, and is surprising for users.
The explicit passing of `--run-reproducer` to express user-intent seems more
in line with what is expected from `mlir-opt`.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D149820
2023-05-04 11:08:03 -07:00
Mehdi Amini
87e6e490e7 Add an action for each iteration of the GreedyPatternRewriteDriver
Differential Revision: https://reviews.llvm.org/D149101
2023-04-29 23:37:11 -07:00
Mehdi Amini
67205f907a Remove -action suffix from the tag defining an Action: it is redundant here
Differential Revision: https://reviews.llvm.org/D149036
2023-04-23 23:06:27 -06:00
Mehdi Amini
7f069f5ef4 Add a breakpoint manager that matches based on File/Line/Col Locations
This will match the locations attached to the IRunits passed in as context
with an action.

This is a recommit of d09c80515d0e after fixing the test on Windows.

Differential Revision: https://reviews.llvm.org/D144815
2023-04-21 23:54:20 -06:00
Mehdi Amini
6fb4c9fdc1 Revert "Add a breakpoint manager that matches based on File/Line/Col Locations"
This reverts commit d09c80515d0e7b1f1a81d3f18a3e799565f5e969.

This is broken on Windows
2023-04-21 23:24:05 -06:00
Mehdi Amini
d09c80515d Add a breakpoint manager that matches based on File/Line/Col Locations
This will match the locations attached to the IRunits passed in as context
with an action.

Differential Revision: https://reviews.llvm.org/D144815
2023-04-21 22:28:27 -06:00
Kai Sasaki
470f3cee35
[mlir] Catch the case using ir print without disabling multithread
-mlir-print-ir-module-scope option cannot be used without disabling multithread for pass manager. For the usability, we can throw a validation error in mlir-opt instead of assertion failure.

Issue: https://github.com/llvm/llvm-project/issues/61578

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D146785
2023-04-02 15:47:11 +09:00
Mehdi Amini
f406adf134 Add capture of "IRUnits" as context for an MLIR Action
IRUnit is defined as:

  using IRUnit = PointerUnion<Operation *, Region *, Block *, Value>;

The tracing::Action is extended to take an ArrayRef<IRUnit> as context to
describe an Action. It is demonstrated in the "ActionLogging" observer.

Reviewed By: rriddle, Mogball

Differential Revision: https://reviews.llvm.org/D144814
2023-03-20 13:40:55 +01:00
Mehdi Amini
930744fcda Add an Observer for logging actions application to a stream
Integrate the `tracing::ExecutionContext()` into mlir-opt with a new
--log-action-to=<file> option to demonstrate the feature.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D144813
2023-03-20 13:39:01 +01:00
Kirill Stoimenov
50cd2c257c [LSAN] Disable leaks in test using environment variables instead of not running them with ASAN.
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D145615
2023-03-08 23:20:40 +00:00
Bruno Schmitt
c9986f8263 [mlir][Pass] Handle spaces in pipeline strings
An user might want to add extra spaces for better readability, e.g:
```
mypm = pm.PassManager.parse(f"""builtin.module(
    mypass1,
        func.func(mypass2,mypass3)
)""")
```
GitHub issue #59151

The parser was not taking into account the possibility of spaces after
`)`or `}`

Differential Revision: https://reviews.llvm.org/D142821
2023-01-30 12:49:19 -08:00
Matthias Springer
e7790fbed3 [mlir] Add test-convergence option to Canonicalizer tests
This new option is set to `false` by default. It should  be set only in Canonicalizer tests to detect faulty canonicalization patterns. I.e., patterns that prevent the canonicalizer from converging. The canonicalizer should always convergence on such small unit tests that we have in `canonicalize.mlir`.

Two faulty canonicalization patterns were detected and fixed with this change.

Differential Revision: https://reviews.llvm.org/D140873
2023-01-04 12:02:21 +01:00
Matthias Springer
391cb54122 [mlir] Add option to limit number of pattern rewrites in CanonicalizerPass
The greedy pattern rewriter consists of two nested loops. `config.maxIterations` (which configurable on the CanonicalizerPass) controls the maximum number of iterations of the outer loop.

```
/// This specifies the maximum number of times the rewriter will iterate
/// between applying patterns and simplifying regions. Use `kNoLimit` to
/// disable this iteration limit.
int64_t maxIterations = 10;
```

This change adds `config.maxNumRewrites` which controls the maximum number of pattern rewrites within an iteration. (It effectively control the maximum number of iterations of the inner loop.)

This flag is meant for debugging and useful in cases where one or multiple faulty patterns can be applied indefinitely, resulting in an infinite loop.

Differential Revision: https://reviews.llvm.org/D140525
2022-12-23 13:08:53 +01:00
Will Dietz
d41b3bf7c3 [mlir][Pass] Fix dropped statistics with nested adaptors.
When running in parallel, nesting more than once caused
statistics to be dropped.

Fix by also preparing "async" pass managers before merging,
as they may also have "async" pass managers within.

Add test checking reported statistics have expected values
with and without threading enabled.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D139459
2022-12-07 08:31:43 -06:00
rkayaith
d511a5d471 [mlir] Include anchor op in reproducer pipeline string
Including the anchor op ensures that all pass manager settings are fully
specified, and makes the string consistent with the printed form.

Depends on D134622

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D134623
2022-11-03 11:44:57 -04:00
rkayaith
13bd410962 [mlir][Pass] Include anchor op in -pass-pipeline
In D134622 the printed form of a pass manager is changed to include the
name of the op that the pass manager is anchored on. This updates the
`-pass-pipeline` argument format to include the anchor op as well, so
that the printed form of a pipeline can be directly passed to
`-pass-pipeline`. In most cases this requires updating
`-pass-pipeline='pipeline'` to
`-pass-pipeline='builtin.module(pipeline)'`.

This also fixes an outdated assert that prevented running a
`PassManager` anchored on `'any'`.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D134900
2022-11-03 11:36:12 -04:00
rkayaith
0c36a1569a [mlir][Pass] Disallow mixing -pass-pipeline with other pass options
Currently `-pass-pipeline` can be specified multiple times and mixed
with the individual `-pass-name` options. Removing this feature will
allow for including the pipeline anchor as part of the option
argument (see D134900).

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D135745
2022-11-02 12:16:50 -04:00
rkayaith
1c0f541a4d [mlir] Don't mix -pass-pipeline with other pass options
These are test updates required for D135745, which disallows mixing
`-pass-pipeline` and the individual `-pass-name` options.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D135746
2022-11-02 12:10:51 -04:00
rkayaith
cad61e49b2 [mlir-opt] Add a '-dump-pass-pipeline' option
Add an option to dump the pipeline that will be run to stderr. A
dedicated option is needed since the existing `test-dump-pipeline`
pipeline won't be usable with `-pass-pipeline` after D135745.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D135747
2022-10-20 19:20:24 -04:00
rkayaith
e874bbc292 [mlir] Include anchor op when printing pass managers
Previously a pipeline nested on `anchor-op` would print as just
`'pipeline'`, now it will print as `'anchor-op(pipeline)'`. This ensures
the text form includes all information needed to reconstruct the pass
manager.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D134622
2022-10-20 19:17:45 -04:00
Christian Sigg
720dd814ba [MLIR] Fix after 4b27825.
The 'RUN' command was missing the input file argument.
2022-09-28 10:15:41 +02:00
rkayaith
4b27825ba3 [mlir-opt] Support parsing operations other than 'builtin.module' as top-level
This adds a `--no-implicit-module` option, which disables the insertion
of a top-level `builtin.module` during parsing. In this mode any op may
be top-level, however it's required that there be exactly one top-level
op in the source.

`parseSource{File,String}` now support `Operation *` as the container op
type, which disables the top-level-op-insertion behaviour.

Following patches will add the same option to the other tools as well.

Depends on D133644

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D133645
2022-09-27 21:13:47 -04:00
Michele Scuttari
039b969b32
Revert "[MLIR] Update pass declarations to new autogenerated files"
This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359.
2022-08-30 22:21:55 +02:00
Michele Scuttari
2be8af8f0e
[MLIR] Update pass declarations to new autogenerated files
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.

Reviewed By: mehdi_amini, rriddle

Differential Review: https://reviews.llvm.org/D132838
2022-08-30 21:56:31 +02:00
Slava Zakharin
04644a9e55 [mlir] Fixed ordering of pass statistics.
The change makes sure the plain C string statistics names
are properly ordered.

Differential Revision: https://reviews.llvm.org/D130122
2022-07-19 15:52:02 -07:00
Stella Laurenzo
1d6a90418e Example:
```
// -----// IR Dump Before LowerLinalgMicrokernels (iree-vmvx-lower-linalg-microkernels) //----- //
```

I've been meaning to suggest this for a long time, and I think the only reason we don't have it is because we didn't used to have the `getArgument()` handy when printing these comments. When debugging or putting a pipeline together based on such dumps, I often find myself grepping for the argument name of the pass (which is often related but not universally).
2022-07-15 23:27:14 -07:00
River Riddle
361acbb362 [mlir] Refactor pass crash reproducer generation to be an assembly resource
We currently generate reproducer configurations using a comment placed at
the top of the generated .mlir file. This is kind of hacky given that comments
have no semantic context in the source file and can easily be dropped. This
strategy also wouldn't work if/when we have a bitcode format. This commit
switches to using an external assembly resource, which is verifiable/can
work with a hypothetical bitcode naturally/and removes the awkward processing
from mlir-opt for splicing comments and re-applying command line options. With
the removal of command line munging, this opens up new possibilities for
executing reproducers in memory.

Differential Revision: https://reviews.llvm.org/D126447
2022-06-29 12:14:02 -07:00
River Riddle
86e1c2f097 [mlir] Fix pipeline-parsing.mlir on windows
We shouldn't be making assumptions about the result of llvm::getTypeName,
which may have different results for anonymous namespaces depending
on the platform.
2022-05-12 13:40:16 -07:00
River Riddle
c2fb9c29b4 [mlir:Pass] Add support for op-agnostic pass managers
This commit refactors the current pass manager support to allow for
operation agnostic pass managers. This allows for a series of passes
to be executed on any viable pass manager root operation, instead
of one specific operation type. Op-agnostic/generic pass managers
only allow for adding op-agnostic passes.

These types of pass managers are extremely useful when constructing
pass pipelines that can apply to many different types of operations,
e.g., the default inliner simplification pipeline. With the advent of
interface/trait passes, this support can be used to define FunctionOpInterface
pass managers, or other pass managers that effectively operate on
specific interfaces/traits/etc (see #52916 for an example).

Differential Revision: https://reviews.llvm.org/D123536
2022-05-12 13:12:59 -07:00
River Riddle
a4936cb3e8 [mlir][NFC] Update textual references of func to func.func in Pass/Target tests
The special case parsing of `func` operations is being removed.
2022-04-20 22:17:30 -07:00
Mehdi Amini
02eac667ed Improve invalid-ir-print-after-failure.mlir to show the effects of -mlir-print-assume-verified (NFC) 2022-04-20 20:40:41 +00:00
Mehdi Amini
83892d76f4 Print custom assembly on pass failure by default
The printer is now resilient to invalid IR and will already automatically
fallback to the generic form on invalid IR. Using the generic printer on
pass failure was a conservative option before the printer was made
failsafe.

Reviewed By: lattner, rriddle, jpienaar, bondhugula

Differential Revision: https://reviews.llvm.org/D123915
2022-04-19 17:29:08 +00:00
Mehdi Amini
d98481a1e7 Revert "[MLIR] Provide a way to print ops in custom form on pass failure"
This reverts commit daabcf5f04bbd13ac53f76ca3cc43b0d1ef64f5a.

This patch still had on-going discussion that should be closed before
committing.
2022-04-17 18:55:09 +00:00
Uday Bondhugula
daabcf5f04 [MLIR] Provide a way to print ops in custom form on pass failure
The generic form of the op is too verbose and in some cases not
readable. On pass failure, ops have been so far printed in generic form
to provide a (stronger) guarantee that the IR print succeeds. However,
in a large number of pass failure cases, the IR is still valid and
the custom printers for the ops will succeed. In fact, readability is
highly desirable post pass failure. This revision provides an option to
print ops in their custom/pretty-printed form on IR failure -- this
option is unsafe and there is no guarantee it will succeed. It's
disabled by default and can be turned on only if needed.

Differential Revision: https://reviews.llvm.org/D123893
2022-04-17 20:10:40 +05:30
Andrzej Warzynski
fb16ed258c [mlir] Prefix pass manager options with mlir-
With this change, there's going to be a clear distinction between LLVM
and MLIR pass maanger options (e.g. `-mlir-print-after-all` vs
`-print-after-all`). This change is desirable from the point of view of
projects that depend on both LLVM and MLIR, e.g. Flang.

For consistency, all pass manager options in MLIR are prefixed with
`mlir-`, even options that don't have equivalents in LLVM .

Differential Revision: https://reviews.llvm.org/D123495
2022-04-12 09:32:44 +00:00
River Riddle
0d8df98035 [mlir] Allow for using OpPassManager in pass options
This significantly simplifies the boilerplate necessary for passes
to define nested pass pipelines.

Differential Revision: https://reviews.llvm.org/D122880
2022-04-02 00:45:11 -07:00