FLAG DESCRIPTIONS
SUN C AND FORTRAN SC5.0
-Bstatic Specify static binding
-dalign Assume double-type data is double aligned
-depend Enable all dependence based transformations
-dn Specify static binding
-fsimple Allow the optimizer to use mathematically equivalent expressions
-ftrap=tset Use the IEEE trapping modes in effect at startup
-libmil Use inline expansion templates for libm
-native Ascertain available machine characteristics generate code
accordingly
-xO4 Generate optimized code. See -O4 below.
-xO5 Generate optimized code. See -O5 below.
-pad[=
] Pad local variables or common blocks, or both, for
efficient use of the cache
-[x]pad=local Pad local variables only, for better use of cache.
-[x]pad=common Pad common block variables, for better use of cache.
-unroll=X Suggestion to optimizer to unroll loops X times
-Xa Compile assuming ANSI C conformance, allow K & Rons
(default mode)
-xarch= Limit the set of instructions the compiler may use to
(generic,v7,v8a,v8,v8plus,v8plusa)
-xcache= Define the cache properties for use by the optimizer
(16/32/4:512/64/1)
-xchip= Define the instruction scheduling properties for use by
the optimizer (ultra)
-xcrossfile enable cross-file inlining.
-xlibmopt Link with -lmopt and -lcopt in proper order
-xprofile=use Use data collected for profile feedback
-xprofile=collect
Collect profile data for feedback directed optimizations.
-xparallel Use parallel processing to improve performance
-xreduction Parallelize loops containing reductions
-xsafe=mem Optimizes for prefetch instructions, and when the flag
-xarch=v8plus is set, assumes that no memory based traps
will occur
-xsfpconst Represent unsuffixed floating point constants as
single precision
-xtarget= Machine target for compilation.
-fast Fast execution. Select the combination of compilation
options that optimizes for speed of execution without
excessive compilation time. This is a convenience option,
and it chooses:
o The -native best machine characteristics option
o Optimization level: -O3
o A set of inline expansion templates
o The -fsimple option
o The -dalign option (SPARC only)
o The -xlibmopt option (SPARC only)
In Solaris 2.x only, the -fast option includes
-fns -ftrap=%none; that is, turn off all trapping.
-xO4: Besides what -O3 does, this option does
automatic inlining of functions in the same
file. The code usually runs faster, but for
some code, -O4 makes it run more slowly. -g
suppresses automatic inlining. In general,
-O4 results in larger code.
-xO5 Besides what -xO4 does, enables speculative code motion.
-xrestrict[=f1,...,f2,%all, %none]
Treat pointer-valued function parameters as restricted
pointers. This command-line option can be used on its
own, but is best used with optimization.
The default is %none. Specifying -xrestrict is
equivalent to specifying -xrestrict=%all.
-Qoption
Pass flags along to compiler phase:
cg Code generator
f77pass1 Fortran first pass
iropt Internal representation optimizer
-W,
Pass flags along to compiler phase:
2 Second pass
c code generator
-Qoption cg -Qms_pipe+nfll=5
heuristic to select shallow nodes for critical path scheduling
-Qoption cg -Qpeep-Sh0-Hl1
Don't hoist instructions beyond loop headers
-Qoption cg -stdio
Strength reduce printf("%c",...) into putc
-Qoption f77pass1 -cbasereg
Use a common base register to address static data
-Qoption iropt -O4+ansi_alias
Assume (more restrictive) ANSI C semantics for pointer aliasing
-Qoption iropt -O4+restrict
Same as -xrestrict
-Qoption iropt -O4+restrict_g
makes global pointer values as if they were restricted pointers
(See also -xrestrict)
-Qoption iropt -O4+vector
enable vectorization of loops with calls to math routines
-W2,-fsimple=2 perform aggresive floating point simplification and
optimizations.
-W2,-Mp Procedures with entry counts equal or greater than n
become candidates for inlining.
-W2,-Ms set the inline recursion level to n, i.e. inline recursive
routines one level.
-W2,-Mt The maximum size of a routine body elegible for inlining
is limited to n triples.
-W2,-Mrn Restrict maximum size increase due to inlining to n triples
-W2,-O4+pde enable aggressive dead code elimination
-W2,-O4+cond_elim
enable aggresive optimizations of conditional branches
-W2,-O4+bopt enable aggresive optimizations of all branches
-W2,-whole use whole program mode
-W2,-ANSI_S use ANSI semantics for routines with hidden control flow (e.g.
setjmp)
-W2,-ldstr enable hoisting of load and store instructions
-Qoption cg -Qms_pipe+mkuf=
limit kernel unrolling of pipelined loops to n.
-Wc,-QrmT1 enable allocation of global registers
-Wc,-HLnxyhwbli Use aggressive scheduling strategy for ALU instructions
-Wc,-Qicache-L1-bsize=4-bbits=7
do L1 instruction cache alignment
-Wc,-Qiselect-funcalign=
do function entry alignment at n-byte boundaries.
-Wc,-Qpeep-Ex:use_int64=1
use 64 bit integer registers where appropriate
-Wc,-Qpeep-Sb0,-Qpeep-Cl1
use profile data for block reordering
-Wc,-Qiselect-sw_pf_tbl_th=
Peels n branches/cases preceding an indirect branch
type of switch. This is effective only when profile
feedback is used.
-lmvec Link in the vector math libraries.
-lfast Link in the fast system libraries.
FLAGS IN USE FOR SPEC92 SUBMISSIONS
-----------------------------------
-cg89 Make instructions/scheduling for SPARC V7
-cg92 Make instructions/scheduling for SPARC V8
-Qoption cg -noregwin=xleval+xlevarg+evform
Do not use register windows for the named functions
-W2,-Qxlygetvalue
treat function xlygetvalue as a pure function.