-qcompact
Category
Purpose
Avoids optimizations that increase code size.
Defaults
-qnocompact
Usage
Code size is typically reduced by inhibiting optimizations that replicate or expand code inline, such as inlining or loop unrolling. Execution time might increase.
This option takes effect only when it is specified at the -O2 optimization level, or higher.
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 the following command:
xlc myprogram.c -O -qcompact