Go to main content
Oracle® Developer Studio 12.5: Numerical Computation Guide

Exit Print View

Updated: June 2016
 
 

5.2 Code Generation Options

Oracle Developer Studio 12.5 supports many different SPARC and x86 processor chips. For each of these processor chips, there is an –xtarget= command-line compiler option. The –-xtarget= option specifies the instruction set implemented, the particular processor chip implementing that instruction set, and the size of the various caches. –xtarget serves as a macro for the following:

–xarch=architecture

The compiler optimizes code by using the –xarch= option to determine which instructions are implemented in hardware and thus suitable for code generation.

–xchip=chip

The compiler optimizes code by using the –xchip= option to determine which specific chip is intended and thus how instructions should be scheduled.

–xcache=cache-size

The compiler optimizes code by using the –xcache= option to determine how to block loops to minimize memory traffic.

By optimizing for a particular target, you get the best code for that target, which might be very bad for a different target with a different instruction set and scheduling constraints. When one executable is intended to be run on many different target systems, then the default generic code generation is best, and it can also be explicitly selected with the option –xtarget=generic.

Some of the –xtarget= names are less than obvious. To specify a particular target, you can use the –native option with the Oracle Developer Studio compilers, which will select the –xtarget= automatically for the system being compiled on. On SPARC systems, similar information is displayed by the fpversion command. For more information, see SPARC Behavior and Implementation.