This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Commit 1b16481
committed
[mlir][NFC] Split registerAndParseCLIOptions() in mlir-opt (#166538)
mlir-opt's registerAndParseCLIOptions() forces users to both register
default MLIR options and parse the command line string. Custom mlir-opt
implementations, however, may need to provide own options or own
parsing. It seems that separating the two functions makes it easier to
achieve necessary customizations.
For example, one can register "default" options, then register custom
options (not available in standard mlir-opt), then parse all of them.
Other cases include two-stage parsing where some additional options
become available based on parsed information (e.g. compilation target
can allow additional options to be present).1 parent 3f4ba0b commit 1b16481
File tree
2 files changed
+35
-12
lines changed- mlir
- include/mlir/Tools/mlir-opt
- lib/Tools/mlir-opt
2 files changed
+35
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
302 | 316 | | |
303 | 317 | | |
304 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
| 557 | + | |
| 558 | + | |
568 | 559 | | |
569 | 560 | | |
570 | 561 | | |
| |||
579 | 570 | | |
580 | 571 | | |
581 | 572 | | |
582 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
583 | 584 | | |
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
587 | 596 | | |
588 | 597 | | |
589 | 598 | | |
| |||
0 commit comments