[flang-commits] [flang] [flang] Implement !DIR$ [NO]INLINE and FORCEINLINE directives (PR #134350)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon May 12 07:49:04 PDT 2025


tblah wrote:

If I understand correctly the problem is that the llvm attributes have to be placed on the function operation not the call operation?

I would recommend looking up the function definition from the symbol used in the call operation. If that can be found, add the attributes there. If there is no function definition in the current translation unit then it cannot be inlined anyway(*).

(*) technically this could be possible with LTO, but with the way the compiler driver works currently, the symbol lookup would have to be done in the llvm backend (during linking). I think attempting this is a bit out of scope for this flang work. In the end whatever inlining attributes were supported in classic flang would have been constrained in the same way by the LLVM backend.

Please let me know if you intend to continue to work on this.

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


More information about the flang-commits mailing list