@@ -494,8 +494,8 @@ infrastructure as
494
494
[`llvm::Statistic`](http:// llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option)
495
495
and thus have similar usage constraints. Collected statistics can be dumped by
496
496
the [pass manager](#pass-manager) programmatically via
497
- `PassManager::enableStatistics`; or via `-pass-statistics` and
498
- `-pass-statistics-display` on the command line.
497
+ `PassManager::enableStatistics`; or via `-mlir- pass-statistics` and
498
+ `-mlir- pass-statistics-display` on the command line.
499
499
500
500
An example is shown below:
501
501
@@ -534,7 +534,7 @@ A pipeline view that models the structure of the pass manager, this is the
534
534
default view:
535
535
536
536
```shell
537
- $ mlir-opt -pass-pipeline='func.func(my-pass,my-pass)' foo.mlir -pass-statistics
537
+ $ mlir-opt -pass-pipeline='func.func(my-pass,my-pass)' foo.mlir -mlir- pass-statistics
538
538
539
539
===-------------------------------------------------------------------------===
540
540
... Pass statistics report ...
@@ -553,7 +553,7 @@ A list view that aggregates the statistics of all instances of a specific pass
553
553
together:
554
554
555
555
``` shell
556
- $ mlir-opt -pass-pipeline=' func.func(my-pass, my-pass)' foo.mlir -pass-statistics -pass-statistics-display=list
556
+ $ mlir-opt -pass-pipeline=' func.func(my-pass, my-pass)' foo.mlir -mlir- pass-statistics -mlir -pass-statistics-display=list
557
557
558
558
===-------------------------------------------------------------------------===
559
559
... Pass statistics report ...
@@ -1082,13 +1082,13 @@ instrumentation can be added directly to the PassManager via the
1082
1082
` enableIRPrinting ` method. ` mlir-opt ` provides a few useful flags for utilizing
1083
1083
this instrumentation:
1084
1084
1085
- * ` print-ir-before=(comma-separated-pass-list) `
1085
+ * ` mlir- print-ir-before=(comma-separated-pass-list)`
1086
1086
* Print the IR before each of the passes provided within the pass list.
1087
- * ` print-ir-before-all `
1087
+ * ` mlir- print-ir-before-all`
1088
1088
* Print the IR before every pass in the pipeline.
1089
1089
1090
1090
``` shell
1091
- $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse)' -print-ir-before=cse
1091
+ $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse)' -mlir- print-ir-before=cse
1092
1092
1093
1093
*** IR Dump Before CSE ***
1094
1094
func @simple_constant () -> (i32, i32) {
@@ -1098,13 +1098,13 @@ func @simple_constant() -> (i32, i32) {
1098
1098
}
1099
1099
```
1100
1100
1101
- * ` print-ir-after=(comma-separated-pass-list) `
1101
+ * ` mlir- print-ir-after=(comma-separated-pass-list)`
1102
1102
* Print the IR after each of the passes provided within the pass list.
1103
- * ` print-ir-after-all `
1103
+ * ` mlir- print-ir-after-all`
1104
1104
* Print the IR after every pass in the pipeline.
1105
1105
1106
1106
``` shell
1107
- $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse)' -print-ir-after=cse
1107
+ $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse)' -mlir- print-ir-after=cse
1108
1108
1109
1109
*** IR Dump After CSE ***
1110
1110
func @simple_constant () -> (i32, i32) {
@@ -1113,19 +1113,19 @@ func @simple_constant() -> (i32, i32) {
1113
1113
}
1114
1114
```
1115
1115
1116
- * ` print-ir-after-change `
1116
+ * ` mlir- print-ir-after-change`
1117
1117
* Only print the IR after a pass if the pass mutated the IR. This helps to
1118
1118
reduce the number of IR dumps for "uninteresting" passes.
1119
1119
* Note: Changes are detected by comparing a hash of the operation before
1120
1120
and after the pass. This adds additional run-time to compute the hash of
1121
1121
the IR, and in some rare cases may result in false-positives depending
1122
1122
on the collision rate of the hash algorithm used.
1123
1123
* Note: This option should be used in unison with one of the other
1124
- 'print-ir-after' options above, as this option alone does not enable
1124
+ 'mlir- print-ir-after' options above, as this option alone does not enable
1125
1125
printing.
1126
1126
1127
1127
``` shell
1128
- $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse,cse)' -print-ir-after=cse -print-ir-after-change
1128
+ $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse,cse)' -mlir- print-ir-after=cse -mlir -print-ir-after-change
1129
1129
1130
1130
*** IR Dump After CSE ***
1131
1131
func @simple_constant () -> (i32, i32) {
@@ -1134,13 +1134,13 @@ func @simple_constant() -> (i32, i32) {
1134
1134
}
1135
1135
```
1136
1136
1137
- * ` print-ir-after-failure `
1137
+ * ` mlir- print-ir-after-failure`
1138
1138
* Only print IR after a pass failure.
1139
- * This option should * not* be used with the other ` print-ir-after ` flags
1139
+ * This option should * not* be used with the other ` mlir- print-ir-after` flags
1140
1140
above.
1141
1141
1142
1142
``` shell
1143
- $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse,bad-pass)' -print-ir-failure
1143
+ $ mlir-opt foo.mlir -pass-pipeline=' func.func(cse,bad-pass)' -mlir- print-ir-after -failure
1144
1144
1145
1145
*** IR Dump After BadPass Failed ***
1146
1146
func @simple_constant () -> (i32, i32) {
@@ -1149,14 +1149,14 @@ func @simple_constant() -> (i32, i32) {
1149
1149
}
1150
1150
```
1151
1151
1152
- * ` print-ir-module-scope `
1152
+ * ` mlir- print-ir-module-scope`
1153
1153
* Always print the top-level module operation, regardless of pass type or
1154
1154
operation nesting level.
1155
1155
* Note: Printing at module scope should only be used when multi-threading
1156
1156
is disabled(` -mlir-disable-threading ` )
1157
1157
1158
1158
``` shell
1159
- $ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline=' func.func(cse)' -print-ir-after=cse -print-ir-module-scope
1159
+ $ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline=' func.func(cse)' -mlir- print-ir-after=cse -mlir -print-ir-module-scope
1160
1160
1161
1161
*** IR Dump After CSE *** (' func.func' operation: @bar)
1162
1162
func @bar(%arg0: f32, %arg1: f32) -> f32 {
@@ -1186,7 +1186,7 @@ The [pass manager](#pass-manager) in MLIR contains a builtin mechanism to
1186
1186
generate reproducibles in the event of a crash, or a
1187
1187
[pass failure](#pass-failure). This functionality can be enabled via
1188
1188
`PassManager::enableCrashReproducerGeneration` or via the command line flag
1189
- `pass-pipeline-crash-reproducer`. In either case , an argument is provided that
1189
+ `mlir- pass-pipeline-crash-reproducer`. In either case , an argument is provided that
1190
1190
corresponds to the output `.mlir` file name that the reproducible should be
1191
1191
written to. The reproducible contains the configuration of the pass manager that
1192
1192
was executing, as well as the initial IR before any passes were run. A potential
@@ -1214,7 +1214,7 @@ to its stream.
1214
1214
1215
1215
An additional flag may be passed to
1216
1216
` PassManager::enableCrashReproducerGeneration ` , and specified via
1217
- ` pass-pipeline-local-reproducer ` on the command line, that signals that the pass
1217
+ ` mlir- pass-pipeline-local-reproducer` on the command line, that signals that the pass
1218
1218
manager should attempt to generate a "local" reproducer. This will attempt to
1219
1219
generate a reproducer containing IR right before the pass that fails. This is
1220
1220
useful for situations where the crash is known to be within a specific pass, or
0 commit comments