[Mlir-commits] [mlir] [MLIR] Add support for frame pointers in MLIR (PR #72145)

Tobias Gysi llvmlistbot at llvm.org
Wed Nov 15 08:18:31 PST 2023


================
@@ -1650,6 +1652,13 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
         context, IntegerAttr::get(intTy, attr.getVScaleRangeMin()),
         IntegerAttr::get(intTy, attr.getVScaleRangeMax().value_or(0))));
   }
+
+  // Process frame-pointer attribute
+  if (func->hasFnAttribute("frame-pointer")) {
+    llvm::StringRef stringRefFramePointerKind = func->getFnAttribute("frame-pointer").getValueAsString();
----------------
gysit wrote:

```suggestion
    StringRef stringRefFramePointerKind = func->getFnAttribute("frame-pointer").getValueAsString();
```
ultra nit: I think you can drop the llvm namespace here since StringRef exists in the mlir namespace as well.

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


More information about the Mlir-commits mailing list