[mlir][Pass] Handle spaces in pipeline strings
authorBruno Schmitt <bruno@oschmitt.com>
Mon, 30 Jan 2023 20:49:19 +0000 (12:49 -0800)
committerMin-Yih Hsu <minyihh@uci.edu>
Mon, 30 Jan 2023 20:49:19 +0000 (12:49 -0800)
commitc9986f8263980ce6bc9ef87d96d97911eaad547d
tree1a02889fc1a8e49fde3c6f8687feaf7ce4cde8e9
parent0b4224011aecb98facd406dc68dacecff40109e8
[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
mlir/lib/Pass/PassRegistry.cpp
mlir/test/Pass/pipeline-parsing.mlir
mlir/test/python/pass_manager.py