[flang-dev] [EXTERNAL] [LLVM Flang] Code gen option: `-emit-fir` vs `-emit-mlir`

Andrzej Warzynski via flang-dev flang-dev at lists.llvm.org
Thu Sep 9 12:10:44 PDT 2021


Thank you both for your comments! One other minor point in favour of 
`-emit-mlir` - `bbc` already uses `mlir` for file extensions.

-Andrzej

On 09/09/2021 17:13, Perry-Holby, Alexis wrote:
> Interesting, I did not know that.  In light of this new information, 
> perhaps -emit-mlir does fit better.
> 
> -- Alexis
> 
> *From: *Mehdi AMINI <joker.eph at gmail.com>
> *Date: *Thursday, September 9, 2021 at 10:01 AM
> *To: *"Perry-Holby, Alexis" <aperry at lanl.gov>
> *Cc: *Andrzej Warzynski <andrzej.warzynski at arm.com>, via flang-dev 
> <flang-dev at lists.llvm.org>
> *Subject: *Re: [flang-dev] [EXTERNAL] [LLVM Flang] Code gen option: 
> `-emit-fir` vs `-emit-mlir`
> 
> On Thu, Sep 9, 2021 at 8:22 AM Perry-Holby, Alexis via flang-dev 
> <flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>> wrote:
> 
>     Hi Andrzej,
> 
>     For my two cents, I have a mild preference for -emit-fir.  When I
>     see -emit-mlir I think it implies that only the standard dialect
>     will be present (i.e. no fir in there).
> 
> FYI: the standard dialect is shrinking and the goal is for it to 
> disappear entirely.
> 
>        That could just be me though.  Like I said, mine is a mild
>     preference and switching wouldn't cause me much issue.
> 
>     -- Alexis
> 
> 
>     On 9/9/21, 8:03 AM, "flang-dev on behalf of Andrzej Warzynski via
>     flang-dev" <flang-dev-bounces at lists.llvm.org
>     <mailto:flang-dev-bounces at lists.llvm.org> on behalf of
>     flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>> wrote:
> 
>          Hello,
> 
>          We have recently started working on adding code-gen support in
>     the Flang
>          driver. Our first PR is available on GitHub [1] and implements the
>          "parse tree --> MLIR" step.
> 
>          What should be the corresponding option in `flang-new`? `bbc` uses
>          `-emit-fir` [2], but `-emit-mlir` would probably be more accurate.
>          Indeed, currently the generated output uses multiple MLIR dialects
>          (rather than just FIR).
> 
>          Please comment either here or on GitHub.
> 
>          Thank you,
>          -Andrzej
> 
>          [1]
>     https://github.com/flang-compiler/f18-llvm-project/pull/1008
>     <https://github.com/flang-compiler/f18-llvm-project/pull/1008>
>          [2]
>     https://github.com/flang-compiler/f18-llvm-project/blob/fir-dev/flang/tools/bbc/bbc.cpp#L87-L90
>     <https://github.com/flang-compiler/f18-llvm-project/blob/fir-dev/flang/tools/bbc/bbc.cpp#L87-L90>
>          _______________________________________________
>          flang-dev mailing list
>     flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
>     <https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev>
> 
>     _______________________________________________
>     flang-dev mailing list
>     flang-dev at lists.llvm.org <mailto:flang-dev at lists.llvm.org>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev
>     <https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev>
> 


More information about the flang-dev mailing list