JavaSolarisCommunitiesAbout SunHow to BuyMy AccountCartUnited StatesWorldwide
Sun Microsystems Documentation
docs.sun.com
Browse Documentation Titles
Browse Product Documentation
Help

Optimization Options by Language

C Optimization Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-fma Enables automatic generation of floating-point, fused, multiply-add instructions.
-O Macro for -x03. Note: use the capital letter o for this option, not zero.
-s Strips the symbol table from the executable file.
-xalias_level Allows the compiler to perform type-based alias-analysis.
-xarch Specifies the target architecture instruction set (ISA).
-xbinopt Instructs the compiler to prepare the binary for later optimizations, transformations and analysis (see binopt(1)).
-xbuiltin Enables or disables better optimization of standard library calls.
-xcache Defines the cache properties for use by the optimizer.
-xchip Specifies the target processor for use by the optimizer.
-xdepend Analyzes loops for inter-iteration data dependencies and performs loop restructuring.
-xF Enables the optimal reordering of functions and variables by the linker.
-xinline Specifies which user-written routines can be inlined by the optimizer at -xO3 or higher.
-xinstrument Compiles and instruments your program for analysis by the Thread Analyzer.
-xipo Performs interprocedural optimizations.
-xipo_archive Enables the compiler to optimize object files that are passed to the linker with object files that were compiled with -xipo and that reside in the archive library (.a) before producing an executable.
-xjobs Sets compilation for multiple processors.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmaxopt Limits the level of the opt pragma.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.
-xnorunpath Prevents inclusion of a run-time search-path for shared libraries in the executable.
-xO Specifies optimization level.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xpch Activates the precompiled-header feature.
-xpchstop Identifies the last include file to be considered in creating a precompiled-header file.
-xpentium Generates code for the Pentium processor.
-xpg Compiles for profiling with the gprof profiler.
-xprefetch Enables and adjusts prefetch instructions on those architectures that support prefetch.
-xprefetch_auto_type Determines whether or not the compiler generates indirect prefetches for the loops indicated by the -xprefetch_level option in the same fashion that the prefetches for direct memory accesses are generated.
-xprefetch_level Controls the aggressiveness of automatic insertion of prefetch instructions as determined with -xprefetch=auto.
-xprofile Collects or optimizes with runtime profiling data.
-xprofile_pathmap For use in conjunction with the -xprofile=use option.
-xregs Makes available additional scratch registers for use during compilation.
-xrestrict Treats pointer-valued function parameters as restricted pointers.
-xsafe Allows the compiler to assume that no memory protection violations occur.
-xspace Does not allow optimizations that increase code size.
-xtarget Specifies the target system for instruction set and optimization.
-xthreadvar Works in conjunction with the __thread declaration specifier to take advantage of the compiler's thread-local storage facility.
-xunroll Enables unrolling of loops where possible.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.
-xvis Declares the use of the assembly-language templates defined in the VIS[tm] instruction set Software Developers Kit (VSDK).

C++ Optimization Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-fma Enables automatic generation of floating-point, fused, multiply-add instructions.
-instlib Inhibits the generation of template instances that are duplicated in a library, either static or shared, and the current object.
-O Macro for -x03. Note: use the capital letter o for this option, not zero.
-s Strips the symbol table from the executable file.
-xalias_level Allows the compiler to perform type-based alias-analysis.
-xarch Specifies the target architecture instruction set (ISA).
-xbinopt Instructs the compiler to prepare the binary for later optimizations, transformations and analysis (see binopt(1)).
-xbuiltin Enables or disables better optimization of standard library calls.
-xcache Defines the cache properties for use by the optimizer.
-xchip Specifies the target processor for use by the optimizer.
-xcrossfile Enables optimization and inlining across source files.
-xdepend Analyzes loops for inter-iteration data dependencies and performs loop restructuring.
-xF Enables the optimal reordering of functions and variables by the linker.
-xinline Specifies which user-written routines can be inlined by the optimizer at -xO3 or higher.
-xinstrument Compiles and instruments your program for analysis by the Thread Analyzer.
-xipo Performs interprocedural optimizations.
-xjobs Sets compilation for multiple processors.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmaxopt Limits the level of the opt pragma.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.
-xO Specifies optimization level.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xpch Activates the precompiled-header feature.
-xpchstop Identifies the last include file to be considered in creating a precompiled-header file.
-xpg Compiles for profiling with the gprof profiler.
-xprefetch Enables and adjusts prefetch instructions on those architectures that support prefetch.
-xprefetch_auto_type Determines whether or not the compiler generates indirect prefetches for the loops indicated by the -xprefetch_level option in the same fashion that the prefetches for direct memory accesses are generated.
-xprefetch_level Controls the aggressiveness of automatic insertion of prefetch instructions as determined with -xprefetch=auto.
-xprofile Collects or optimizes with runtime profiling data.
-xprofile_ircache Improves compilation time during the use phase of -xprofile by reusing compilation data saved from the collect phase of -xprofile.
-xregs Makes available additional scratch registers for use during compilation.
-xrestrict Treats pointer-valued function parameters as restricted pointers.
-xsafe Allows the compiler to assume that no memory protection violations occur.
-xspace Does not allow optimizations that increase code size.
-xtarget Specifies the target system for instruction set and optimization.
-xthreadvar Works in conjunction with the __thread declaration specifier to take advantage of the compiler's thread-local storage facility.
-xunroll Enables unrolling of loops where possible.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.
-xvis Declares the use of the assembly-language templates defined in the VIS[tm] instruction set Software Developers Kit (VSDK).

F95 Optimization Options

Option Meaning
-fast This option is a macro that you can effectively use as a starting point for tuning an executable for maximum run-time performance.
-fma Enables automatic generation of floating-point, fused, multiply-add instructions.
-O Macro for -x03. Note: use the capital letter o for this option, not zero.
-s Strips the symbol table from the executable file.
-xarch Specifies the target architecture instruction set (ISA).
-xbinopt Instructs the compiler to prepare the binary for later optimizations, transformations and analysis (see binopt(1)).
-xcache Defines the cache properties for use by the optimizer.
-xchip Specifies the target processor for use by the optimizer.
-xcrossfile Enables optimization and inlining across source files.
-xdepend Analyzes loops for inter-iteration data dependencies and performs loop restructuring.
-xF Enables the optimal reordering of functions and variables by the linker.
-xinline Specifies which user-written routines can be inlined by the optimizer at -xO3 or higher.
-xinstrument Compiles and instruments your program for analysis by the Thread Analyzer.
-xipo Performs interprocedural optimizations.
-xipo_archive Enables the compiler to optimize object files that are passed to the linker with object files that were compiled with -xipo and that reside in the archive library (.a) before producing an executable.
-xjobs Sets compilation for multiple processors.
-xlibmil Inlines selected library routines for optimization.
-xlibmopt Uses a library of optimized math routines.
-xlinkopt Performs link-time optimizations on relocatable object files.
-xmaxopt Limits the level of the opt pragma.
-xmemalign Specifies the maximum assumed memory alignment and the behavior of misaligned data accesses.
-xnolibmil Cancels -xlibmil on the command line.
-xnolibmopt Does not use the math routine library by turning off any previously specified -xlibmopt options.
-xO Specifies optimization level.
-xpagesize Set the preferred page size for the stack and the heap.
-xpagesize_heap Set the preferred page size for the heap.
-xpagesize_stack Set the preferred page size for the stack.
-xpg Compiles for profiling with the gprof profiler.
-xprefetch Enables and adjusts prefetch instructions on those architectures that support prefetch.
-xprefetch_auto_type Determines whether or not the compiler generates indirect prefetches for the loops indicated by the -xprefetch_level option in the same fashion that the prefetches for direct memory accesses are generated.
-xprefetch_level Controls the aggressiveness of automatic insertion of prefetch instructions as determined with -xprefetch=auto.
-xprofile Collects or optimizes with runtime profiling data.
-xprofile_ircache Improves compilation time during the use phase of -xprofile by reusing compilation data saved from the collect phase of -xprofile.
-xprofile_pathmap For use in conjunction with the -xprofile=use option.
-xregs Makes available additional scratch registers for use during compilation.
-xsafe Allows the compiler to assume that no memory protection violations occur.
-xspace Does not allow optimizations that increase code size.
-xtarget Specifies the target system for instruction set and optimization.
-xunroll Enables unrolling of loops where possible.
-xvector Enables automatic generation of calls to the vector library and/or the generation of the SIMD (Single Instruction Multiple Data) instructions.

ContactAbout SunNewsEmploymentSite MapPrivacyTerms of UseTrademarksCopyright Sun Microsystems, Inc.