SPILL | NOSPILL

Category

Compiler customization

Pragma equivalent

#pragma options (spill) (C only), #pragma options (nospill) (C only)

#pragma option_override(subprogram_name, "OPT(SPILL,size)").

Purpose

Specifies the size (in bytes) of the register spill space, the internal program storage areas used by the optimizer for register spills to storage.

When the SPILL compiler option is in effect, you can specify the size of the spill area to be used for the compilation.

When the NOSPILL compiler option is in effect, the compiler defaults to SPILL(128).

Syntax

Read syntax diagramSkip visual syntax diagram
   .-SP--+------------+-.   
   |     '-(--size--)-' |   
>>-+-NOSP---------------+--------------------------------------><

Defaults

For compiles with LP64 specified, the default for the SPILL compiler option is SPILL(256). For compiles with ILP32 specified, the default for the SPILL compiler option remains as SPILL(128).

Parameters

size
An integer representing the number of bytes for the register allocation spill area.

Usage

When too many registers are in use at once, the compiler saves the contents of some registers in temporary storage, called the spill area.

If your program is very complex, or if there are too many computations to hold in registers at one time and your program needs temporary storage, you might need to increase this area. Do not enlarge the spill area unless the compiler issues a message requesting a larger spill area. In case of a conflict, the largest spill area specified is used.

The maximum spill area size is 1073741823 bytes or 230–1 bytes. Typically, you will only need to specify this option when compiling very large programs with OPTIMIZE.

Note: There is an upper limit for the combined area for your spill area, local variables, and arguments passed to called functions at OPT. For best use of the stack, do not pass large arguments, such as structures, by value.

IPA effects

If you specify the SPILL option for any compilation unit in the IPA compile step, the compiler generates information for the IPA link step. This option also affects the regular object module if you request one by specifying the IPA(OBJECT)

If you specify the SPILL option for the IPA link step, the compiler sets the Compilation Unit values of the SPILL option that you specify. The IPA link step Prolog listing section will display the value of this option.

If you do not specify the SPILL option in the IPA link step, the setting from the IPA compile step for each Compilation Unit will be used.

In either case, subprogram-specific SPILL options will be retained.

The IPA link step merges and optimizes your application code, and then divides it into sections for code generation. Each of these sections is a partition. The IPA link step uses information from the IPA compile step to determine if a subprogram can be placed in a particular partition.

The initial overall SPILL value for a compilation unit is set to the IPA Link SPILL option value, if specified. Otherwise, it is the SPILL option that you specified during the IPA compile step for the compilation unit.

The SPILL value for each subprogram in a partition is determined as follows:

The overall SPILL value for a partition is set to the maximum SPILL value of any subprogram contained within that partition.

The option value that you specified for each IPA object file on the IPA compile step appears in the IPA link step Compiler Options Map listing section.

The Partition Map sections of the IPA link step listing and the object module END information section display the value of the SPILL option. The Partition Map also displays any subprogram-specific SPILL values.

Predefined macros

None.