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

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Fri Oct 24 07:20:39 PDT 2025


================
@@ -53,6 +53,14 @@ A list of non-standard directives supported by Flang
 * `!dir$ novector` disabling vectorization on the following loop.
 * `!dir$ nounroll` disabling unrolling on the following loop.
 * `!dir$ nounroll_and_jam` disabling unrolling and jamming on the following loop.
+* `!dir$ inline` tells the compiler to attempt to inline routines if 
+  this directive is specified before a call statement or for all call function statements
+  within a DO LOOP. This directive can be improved later to support other place(s) for  
+  inlining function calls.
----------------
kkwli wrote:

Suggestion:
`!dir$ inline` instructs the compiler to attempt to inline the called routines if the directive is specified before a call statement or all call statements within the loop body if specified before a DO LOOP or all function references if specified before an assignment statement.

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


More information about the flang-commits mailing list