[Mlir-commits] [mlir] [MLIR] Add support for frame pointers in MLIR (PR #72145)
Christian Ulmann
llvmlistbot at llvm.org
Mon Nov 13 23:14:43 PST 2023
================
@@ -2319,6 +2319,23 @@ ParseResult LLVMFuncOp::parse(OpAsmParser &parser, OperationState &result) {
result.addAttribute(getComdatAttrName(result.name), comdat);
}
+ // Parse the optional frame_pointer
+ if (succeeded(parser.parseOptionalKeyword("frame_pointer"))) {
+ std::string string;
+
+ if (parser.parseEqual() || parser.parseString(&string))
+ return failure();
+ if (!LLVM::symbolizeFramePointerKind(string))
----------------
Dinistro wrote:
Nit: Consider splitting the computation and the check by moving the computation before the if. This allows you to reuse the result in case of a success.
https://github.com/llvm/llvm-project/pull/72145
More information about the Mlir-commits
mailing list