Sun Studio 12: C User's Guide

A.1.1 Optimization and Performance Options

Table A–1 Optimization and Performance Options Table




Selects the optimum combination of compilation options for speed of executable code.


(SPARC) Enables automatic generation of floating-point, fused, multiply-add instructions. 


Prepares the object code to collect data for profiling


(SPARC) Enables the compiler to perform type-based alias analysis and optimizations.


Prepares the binary for later optimizations, transformations and analysis.


Improve the optimization of code that calls standard library functions.


Enables optimization and inlining across source files.


(SPARC) Analyzes loops for inter-iteration data dependencies and does loop restructuring.


Enables reordering of data and functions by the linker.


(SPARC) Enables compiler support for hardware counter-based profiling.


Tries to inline only those functions specified.


Compiles and instruments your program for analysis by the Thread Analyzer. 


(SPARC) Performs whole-program optimizations by invoking an interprocedural analysis component.


Allows crossfile optimization to include archive (.a) libraries.


Sets how many processes the compiler creates.


Inlines some library routines for faster execution.


Links in the Sun-supplied performance libraries.


Performs link-time optimizations on relocatable object files.


Enable library of optimized math routines.


This command limits the level of pragma opt to the level specified.


Does not inline math library routines.


Do not enable library of optimized math routines.


Optimizes the object code.


Prevents inclusion of a run-time search-path for shared libraries in the executable. 


Sets the preferred page size for the stack and the heap.


Sets the preferred page size for the stack.


Sets the preferred page size for the heap.


Reduces compile time for applications whose source files share a common set of include files.


Can be used in conjunction with -xpch to specify the last include file of the viable prefix.


(x86) Optimizes for the PentiumTM processor.


(SPARC) Enable prefetch instructions.


(SPARC) Control the aggressiveness of automatic insertion of prefetch instructions as set by -xprefetch=auto


(SPARC) Controls how indirect prefetches are generated.


Collects data for a profile or uses a profile to optimize.


Improves compilation time of -xprofile=use phase by reusing compilation data saved from the -xprofile=collect phase


Support for multiple programs or shared libraries in a single profile directory.


(SPARC) Treats pointer-valued function parameters as restricted pointers.


(SPARC) Allows the compiler to assume no memory-based traps occur.


Does no optimizations or parallelization of loops that increase code size.


Suggests to the optimizer to unroll loops n times.