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

via flang-commits flang-commits at lists.llvm.org
Wed Dec 6 08:21:11 PST 2023


================
@@ -349,4 +349,21 @@ def VScaleAttr : Pass<"vscale-attr", "mlir::func::FuncOp"> {
   let constructor = "::fir::createVScaleAttrPass()";
 }
 
+def FunctionAttr : Pass<"function-attr", "mlir::func::FuncOp"> {
+  let summary = "Enhance functions with different attributes";
+  let description = [{ This feature introduces a general attribute aimed at customizing function characteristics. 
+     Options include:
+     Add "frame-pointer" attribute to functions: Set an attribute for the frame pointer on functions, to enable 
+     the compiler, to avoid saving the frame pointer in a register in functions where it is unnecessary. 
----------------
jeanPerier wrote:

The wording `, to enable the compiler,` is a bit weird, maybe just skip it.

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


More information about the flang-commits mailing list