[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


================
@@ -894,6 +894,10 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
     llvmFunc->addFnAttr(llvm::Attribute::getWithVScaleRangeArgs(
         getLLVMContext(), attr->getMinRange().getInt(),
         attr->getMaxRange().getInt()));
+  
+  // Add function attribute frame-pointer, if found.
+  if (mlir::LLVM::FramePointerKindAttr attr = func.getFramePointerAttr())
----------------
gysit wrote:

```suggestion
  if (FramePointerKindAttr attr = func.getFramePointerAttr())
```
ultra nit: I think you can drop the namespace due to the using mlir::LLVM at the top of the file.

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


More information about the Mlir-commits mailing list