[flang-commits] [flang] [flang] Implement !DIR$ [NO]INLINE and FORCEINLINE directives (PR #134350)
Jean-Didier PAILLEUX via flang-commits
flang-commits at lists.llvm.org
Thu Apr 17 02:20:04 PDT 2025
JDPailleux wrote:
> > !dir$ inline tells to the compiler to not perform inlining on specific function calls by adding the inlinehint metadata on the call.
>
> Assuming the `not` here is a typo.
>
> > !dir$ forceinline tells to the compiler to not perform inlining on specific function calls by adding the alwaysinline metadata on the call.
>
> Assuming the `not` here is a typo.
>
> Does LLVM support `inline`, `forceinline` attributes on the `call` instruction? Is there a similar clang pragma?
>
> When I did a quick look (not in detail) I only saw references of these attributes on the function definition/declaration.
Hi,
LLVM does not directly support `inline` and `forceinline` attributes (these are directive names used by Intel). The `alwaysinline` and `inlinehint` attributes can be found in function definitions/declarations and are attributes to use for theses directives. And for calls, you can directly modify these attributes locally, without adding them to the function definition.
https://github.com/llvm/llvm-project/pull/134350
More information about the flang-commits
mailing list