-qcompact

Category

Optimization and tuning

Pragma equivalent

#pragma options [no]compact

Purpose

Avoids optimizations that increase code size.

Code size is reduced by inhibiting optimizations that replicate or expand code inline, such as inlining or loop unrolling. Execution time may increase.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nocompact-.   
>>- -q--+-compact---+------------------------------------------><

Defaults

-qnocompact

Usage

This option only has an effect when specified with an optimization option.

Predefined macros

__OPTIMIZE_SIZE__ is predefined to 1 when -qcompact and an optimization level are in effect. Otherwise, it is undefined.

Examples

To compile myprogram.c, instructing the compiler to reduce code size whenever possible, enter:

xlc myprogram.c -O -qcompact