ATTRIBUTES INLINE, NOINLINE, and FORCEINLINE

The ATTRIBUTES directive options INLINE, NOINLINE, and FORCEINLINE can be used to control inlining decisions made by the compiler. You should place the directive option in the procedure whose inlining you want to influence.

Syntax

The INLINE option specifies that a function or subroutine can be inlined. The inlining can be ignored by the compiler if inline heuristics determine it may have a negative impact on performance or will cause too much of an increase in code size. It takes the following form:

cDEC$ ATTRIBUTES INLINE :: procedure

c

Is one of the following: C (or c), !, or *. (See Syntax Rules for Compiler Directives.)

procedure

Is the function or subroutine that can be inlined.

The NOINLINE option disables inlining of a function. It takes the following form:

cDEC$ ATTRIBUTES NOINLINE :: procedure

c

See above.

procedure

Is the function or subroutine that must not be inlined.

The FORCEINLINE option specifies that a function or subroutine must be inlined unless it will cause errors. It takes the following form:

cDEC$ ATTRIBUTES FORCEINLINE :: procedure

c

See above.

procedure

Is the function or subroutine that must be inlined.