[flang-commits] [flang] [flang] Pass to add frame pointer attribute (PR #74598)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Dec 7 02:22:27 PST 2023


kiranchandramohan wrote:

Thanks @jeanPerier for the review. The pass was just following the `vscale_range` pass that was added a month back. I guess it can be argued that `vscale_range` might be needed for any optimisation for SVE that happens in MLIR, although at the moment there is none.

> A few comments inline. My more generic questions are:
> 
> * Can the equivalent be achieved by passing the option to LLVM codegen instead of decorating all functions?

Would that be adding a conversion pattern for func.func in the Flang Codegen.cpp?

> * The pass as it is today is not very flang specific, should it belong to the Func or MLIR LLVM dialect. Unless there is a point for MLIR optimization to know about these aspect, why does it have to be set up in the chain?

This should work. I believe we have a precedent here for the `comdat` pass. https://github.com/llvm/llvm-project/blob/19f4cec676e99e7cc088f4b4e30976d2683e320d/flang/lib/Optimizer/CodeGen/CodeGen.cpp#L3902


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


More information about the flang-commits mailing list