[flang-commits] [clang] [flang] [mlir] [Flang][Driver]Implemented the support for option -f[no-]optimize-sibling-calls in Flang (PR #216650)
Kaviya Rajendiran via flang-commits
flang-commits at lists.llvm.org
Fri Aug 28 02:00:29 PDT 2026
================
@@ -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
More information about the flang-commits
mailing list