================
@@ -501,6 +505,7 @@ def FunctionAttr : Pass<"function-attr",
"mlir::func::FuncOp"> {
"Set LLVM readonly attribute on INTENT(IN) by-reference "
"function arguments, if possible">,
];
+ let dependentDialects = ["mlir::LLVM::LLVMDialect"];
----------------
kaviya2510 wrote:
Yes. The `dependentDialects = ["mlir::LLVM::LLVMDialect"]` declaration is
required because the function-attribute pass uses attribute names defined by
the LLVM dialect.
```cpp
func->setAttr(
getLlvmFuncPropertyAttrName(
context, mlir::LLVM::LLVMFuncOp::getDisableTailCallsAttrName(
llvmFuncOpName)),
mlir::BoolAttr::get(context, true));
```
The testcase `flang/test/Transforms/function-attr-disable-tail-calls.fir` would
fail without this changes.
https://github.com/llvm/llvm-project/pull/216650
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits