[flang-commits] [flang] [flang][fir] Add FIR structured control flow ops to SCF dialect pass. (PR #140374)

via flang-commits flang-commits at lists.llvm.org
Tue May 20 08:36:02 PDT 2025


NexMing wrote:

> > > Can you elaborate on "future work will focus on gradually improving this conversion pass"? What ops will you be converting and where/when will it live in the pipeline? What's the intended use for this conversion upstream?
> > 
> > 
> > There is some discussion here https://discourse.llvm.org/t/rfc-add-fir-affine-optimization-fir-pass-pipeline/86190/5 My envisioned final pipeline is: FIR → standard MLIR (do optimization. ,like SCF->Affine )→ LLVM, and working to implement it.
> 
> Does flang need both FIRToAffine and FIRToSCF if there's a plan for SCFToAffine? I am in favour of a FIRToSCF but I am trying to understand the vision. I don't know if it makes sense to maintain FIRToAffine if you proceed with FIRToSCF, for example.

The FIRToAffine pass was an internship prototype created 4-5 years ago, and it was only part of my experimental attempt to explore optimization paths. I now prefer the pipeline FIRToSCF followed by SCFToAffine, and plan to deprecate FIRToAffine.

https://github.com/llvm/llvm-project/pull/140374


More information about the flang-commits mailing list