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

Jean-Didier PAILLEUX via flang-commits flang-commits at lists.llvm.org
Fri Apr 4 06:42:22 PDT 2025


JDPailleux wrote:

> Thanks for the patch @JDPailleux In my opinion, having 3 options under inline family of directive will be more useful.
> 
> !dir$ inline This will be a hint to the optimizer By adding the "inlinehint" metadata on the call !dir$ forceinline This should be used with caution. By adding the "alwaysinline" metadata on the call !dir$ noinline By adding the "noinline" metadata on the call
> 
> This matches the pragma's supported by intel compiler as well [Below snippet from intel website] !DIR$ INLINE [RECURSIVE] !DIR$ FORCEINLINE [RECURSIVE] !DIR$ NOINLINE

Thanks for your reply ! I'll rename the `INLINE` into `FORCEINLINE`. 
And adding `!dir$ inline` will be done in another PR with the addition of the `inlinehint` attribute into the LLVM mlir dialect just like in this PR : "https://github.com/llvm/llvm-project/pull/133726.

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


More information about the flang-commits mailing list