| Issue |
52813
|
| Summary |
Better mirror API needed for parsing textual pass pipeline
|
| Labels |
mlir:core
|
| Assignees |
|
| Reporter |
stellaraccident
|
Currently we have this code in the inliner, which seems to be the only way to make a dynamic pass like this fit everything together:
```
// Pipelines are expected to be of the form `<op-name>(<pipeline>)`.
size_t pipelineStart = pipeline.find_first_of('(');
if (pipelineStart == StringRef::npos || !pipeline.consume_back(")"))
return failure();
StringRef opName = pipeline.take_front(pipelineStart);
OpPassManager pm(opName);
if (failed(parsePassPipeline(pipeline.drop_front(1 + pipelineStart), pm)))
return failure();
pipelines.try_emplace(opName, std::move(pm));
```
This is unfortunate because `parsePassPipeline` is not a mirror of `OpPassManager::printAsTextualPipeline` (i.e. there is no way to directly recreate an OpPassManager from it without doing this slicing hack). We should either:
* Have a variant of `parsePassPipeline` which takes the exact form printed by `printAsTextualPipeline` and returns an `OpPassManager`
* Teach the option system how to properly roundtrip a nested `OpPassManager`
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs