[PATCH] D121118: [flang] Add OpenMP flag to bbc

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 09:06:39 PST 2022


awarzynski added a comment.

In D121118#3366870 <https://reviews.llvm.org/D121118#3366870>, @shraiysh wrote:

> I like the idea of replacing bbc with flang-new. Once this is done, I don't think we need any other tool (except maybe `fir-opt`). `flang-new` handles F90 <https://reviews.llvm.org/F90> to FIR. `mlir-opt` handles FIR to LLVM IR Dialect. `mlir-translate` handles LLVM IR Dialect to LLVM IR and the rest is handled by `opt` and other LLVM tools. All these could be exposed by `flang-new` so that a user only needs to use `flang-new`. (Not too sure about `fir-opt` but if we can make `flang-new` plug flang optimizations to `mlir-opt` and run them, I don't think we need this either). We just have to expose these tools using `flang-new` properly. (We need to have a definitive discussion about this on discourse someday).

IIUC, `fir-opt` and `mlir-opt` are here to stay. These tools are used for testing specific passes in Flang and MLIR, respectively. We won't be able to merge them because that would require MLIR becoming aware of MLIR passes in Flang (i.e. making MLIR depend on Flang). And compiler driver, e.g. `flang-new`, doesn't require such granularity. Users are more concerned about e.g. `-O0` vs `-O1`. So, it makes sense for `flang-new` and `fir-opt` to remain separate.

In D121118#3366884 <https://reviews.llvm.org/D121118#3366884>, @clementval wrote:

> In D121118#3366637 <https://reviews.llvm.org/D121118#3366637>, @awarzynski wrote:
>
>>> Also, apart from code duplication there's overlap in functionality (AFAIK, `bbc` could already be replaced with `flang-new`).
>
> To be fair this was not the case until your recent patch which was uploaded after this one.

Both `flang-new` and `bbc` consume Fortran source files and generate MLIR files. That's the functionality that I had in mind. IMO, https://reviews.llvm.org/D121198 doesn't change much in the grand scheme of things.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121118/new/

https://reviews.llvm.org/D121118



More information about the llvm-commits mailing list