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

Radu Salavat llvmlistbot at llvm.org
Thu Nov 23 10:42:11 PST 2023


Radu2k wrote:

@zero9178 @Dinistro 

Tried to adjust the code so that it produces the appropriate formatting, but mimicking the **_LinkageAttr_** implementation gives  `#llvm< [mnemonic]"[FPvalue]">` when transforming the LLVM IR into MLIR, whereas lowing to LLVM IR from MLIR does not work. 

Based on my investigation, this is due to the fact that it is declared as an LLVM_Attr which extends AttrDef which also extends DialectAttr and the final attribute is treated as a Dialect attribute in **_AsmPrinter.cpp_** `printDialectAttribute` which prints it as `printDialectSymbol(os, "#", dialect.getNamespace(), attrName);`.

I have tried to change the attribute type and could not find a solution without adding some lines of code in _**LLVMDialect.cpp**_ (Going back to the initial issue).  Please let me know how we should treat this issue, and if there is any possibility to have this implemented without further complicating the dialect, will surely give it a go. 

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


More information about the Mlir-commits mailing list