[flang] Runs FIR SimplifyRegionLitePass pass after calling the inliner
authorJean Perier <jperier@nvidia.com>
Mon, 25 Jul 2022 17:38:08 +0000 (19:38 +0200)
committerJean Perier <jperier@nvidia.com>
Mon, 25 Jul 2022 17:38:59 +0000 (19:38 +0200)
commit244bd7cba7cba6abf889d594cc94355d958a9308
tree9fa5074cc0914c41dad959326b9954eafca8c2ee
parente0af5032f17b09f1f39d4ecfe82a6c23e5526c7c
[flang] Runs FIR SimplifyRegionLitePass pass after calling the inliner

In flang pipeline, the inliner calls createCanonicalizerPass with the region
simplification disabled. The inliner pass does canonicalization even if
no inlining happens. After canonicalization, FIR lite region simplification
must be called to get rid of unreachable regions.
This code exposes the need to run SimplifyRegionLitePass after the inliner is
called with FIR pipeline.

Differential Revision: https://reviews.llvm.org/D130484
flang/include/flang/Tools/CLOptions.inc
flang/test/Driver/bbc-mlir-pass-pipeline.f90
flang/test/Driver/mlir-pass-pipeline.f90
flang/test/Fir/basic-program.fir
flang/test/Fir/simplify-region-lite-after-inliner.fir [new file with mode: 0644]