<?xml version="1.0"?>
<!DOCTYPE flagsdescription
    SYSTEM "http://www.spec.org/dtd/cpuflags1.dtd"
>

<!-- $Id: flags-Sun-Solaris-Studio-Opteron.xml 4015 2006-03-20 16:18:18Z john $ -->

<!-- ... You'll want a nice wide window when reading or editing this .................................................... -->

<!-- This flags file is intended as *both* an example: $SPEC/Docs/flags-advanced.xml and as the flags file for Sun's first
CPU2006 submission.  In order to serve as an example, there are more details in some of the comments than might otherwise be
strictly necessary, and there are definitely more flags than are actually going to be used in the first submission.  --> 

<flagsdescription>

<filename>Sun-Solaris-Studio-Opteron</filename>

<title>Sun Microsystems SPEC CPU Flags: Solaris-Studio-Opteron</title>

<!-- 
  *********************************************************************************************************************
  Preface for flags dump (not used in per-result reports)
  ********************************************************************************************************************* 
-->
<header>
<![CDATA[
<p>Compilers: Sun Studio 11</p>
<p>Operating systems: Solaris 10</p>
<p>Last updated: 18-Jul-2006 cds</p>


<p>The text for many of the descriptions below was taken from the Sun Studio 11 Compiler Documentation, which is
copyright &copy; 2005 Sun Microsystems, Inc.  The original documentation can be found at
<a href="http://docs.sun.com/">docs.sun.com</a>.</p>
]]>
</header>

<!-- 
  *********************************************************************************************************************
  Explanations of platform info, such as boot time settings
  ********************************************************************************************************************* 
-->

<platform_settings>
<![CDATA[

<p><b>Platform settings</b></p>

<p>One or more of the following settings may have been applied to the testbed.  If so, the "Platform Notes" section of the
report will say so; and you can read below to find out more about what these settings mean.</p>

<p><b><kbd>autoup=&lt;n&gt;</kbd></b> (Unix)
<br />When the file system flush daemon <tt>fsflush</tt> runs, it writes to disk all modified file buffers that are more
than <kbd>n</kbd> seconds old.  </p>

<p><b><kbd>PARALLEL=&lt;n&gt;</kbd></b> (Unix)
<br />If programs have been compiled with <kbd>-xautopar</kbd>, this environment variable can be set to the number of
processors that programs should use.
</p>

<p><b><kbd>STACKSIZE=&lt;n&gt;</kbd></b> (Unix)
<br /> Set the size of the stack (temporary storage area) for each slave thread of a multithreaded program.  </p>

<p><b><kbd>submit=echo 'pbind -b...' > dobmk; sh dobmk</kbd></b> (SPEC tools, Unix)
<br /> When running multiple copies of benchmarks, the SPEC config file feature <kbd><b>submit</b></kbd> is sometimes used to
cause individual jobs to be bound to specific processors.  If so, the specific command may be found in the config file; here
is a brief guide to understanding that command: </p>
   <ul>
   <li><kbd><b>submit=</b></kbd> causes the SPEC tools to use this line when submitting jobs.</li>
   <li><kbd><b>echo ...&gt; dobmk</b></kbd> causes the generated commands to be written to a file, namely
       <kbd>dobmk</kbd>.</li>
   <li><kbd><b>pbind -b</b></kbd> causes this copy's processes to be bound to the CPU specified by the expression that
       follows it.  See the config file used in the submission for the exact syntax, which tends to be cumbersome because of
       the need to carefully quote parts of the expression.  When all expressions are evaluated, each core ends up with
       exactly one copy of each benchmark.  The pbind expression may include:
       <ul>
       <li><kbd><b>$SPECUSERNUM</b></kbd>: the SPEC tools-assigned number for this copy of the benchmark.</li>
       <li><kbd><b>psrinfo</b></kbd>: find out what processors are available</li>
       <li><kbd><b>grep on-line</b></kbd>: search the <kbd>psrinfo</kbd> output for information regarding on-line cpus</li>
       <li><kbd><b>expr</b></kbd>: Calculate simple arithmetic expressions.  For example, the effect of binding jobs to a
           (quote-resolved) expression such as: <br /><tt>expr ( $SPECUSERNUM / 4 ) * 8 + ($SPECUSERNUM % 4 ) )</tt>
           <br />would be to send the jobs to processors whose numbers are:
           <br /><tt>0,1,2,3, 8,9,10,11, 16,17,18,19 ...</tt></li>
       <li><kbd><b>awk...print \$1</b></kbd>: Pick out the line corresponding to this copy of the benchmark and use the CPU
           number mentioned at the start of this line.</li>
       </ul></li>
   <li><kbd><b>sh dobmk</b></kbd> actually runs the benchmark.</li>
   </ul>

<p><b><kbd>tune_t_fsflushr=&lt;n&gt;</kbd></b> (Unix)
<br /> Controls the number of seconds between runs of the file system flush daemon, <tt>fsflush</tt>.  </p>

<p><b><kbd>ulimit -s &lt;n&gt;</kbd></b> (Unix)
<br /> Sets the stack size to <kbd>n</kbd> kbytes, or "<kbd>unlimited</kbd>" to allow the stack size to grow without limit.
</p>
]]>
</platform_settings>

<!-- 
  ********************************************************************************************************************
  Compilers
  ********************************************************************************************************************* 
-->

<!-- If there is any chance that your compiler will be used by any third party in conjunction with another compiler, it is
   _strongly_ recommended that the flag names be chosen in such a way as to facilitate flag file merging.

  Sure, the C compiler name below could be "cc", but "sun_cc" is so much less ambiguous.

  The regexp below allows a path, as in /usr/opt/SUNwspro/.  The "(?:pattern)" notation groups the pattern inside the
  parentheses so that the "?" operator that immediately follows the closing parentheses applies to the pattern, thus allowing
  0 or 1 instances of the whole thing.  

  The "(?&lt;!option )" becomes "(?<!option )" to Perl (the '&lt;' is to keep the XML parser happy).  This is to ensure that
  the compiler rules don't gobble the "CC" or "cc" or "f90" from a flag like "-Qoption CC -foo,-bar".
-->

<flag name="sun_CC"
      class="compiler"
      regexp="(?:/\S+/)?(?&lt;!option )CC\b">
<example>CC</example>
Invoke the Sun Studio C++ Compiler
</flag>

<flag name="sun_cc"
      class="compiler"
      regexp="(?:/\S+/)?(?&lt;!option )cc\b">
<example>cc</example>
Invoke the Sun Studio C Compiler.
</flag>

<flag name="sun_f90"
      class="compiler"
      regexp="(?:/\S+/)?(?&lt;!option )f90\b">
<example>f90</example>
Invoke the Sun Studio Fortran 90 Compiler
</flag>

<!-- 
  ********************************************************************************************************************
  Compiler Component Splitters
  ********************************************************************************************************************* 
-->

<!-- 
  The Sun Studio compilation system allows comma-delimited flags to be sent to different components, as in
      -qoption iropt -Adata_access,-Mt7000,-Mm14000
  which sends 3 switches to the optimizer (iropt).

  The flags in this section are "splitters": they break up flags such as the above into their component parts.  If the above
  string were used with this flags file, the rule that follows would separate it into:

      -qoption iropt -Adata_access -qoption iropt -Mt7000 -qoption iropt -Mm14000 
  
  Commonly addressed components include cg, iropt, and f90comp.   

  In the regexp that follows, 
   $1   (cg|iropt|f90comp)   matches one of these three component names
   $2   (-[^,\s]+)           matches "-string"; to be more precise:
                                - matches itself
                                [^class] says match characters that are NOT described by the class between brackets
                                So, we'll accept anything but ",\s" which means comma or whitespace 
                                + says match one or more times
   $3   (-\S+)               matches "-" followed by one or more characters that are not whitespace
   $4   (?=\s|$)             matches whitespace or end of string (see flag_description.html section 3.3.4) 
--> 

<flag name="qoption_splitter" 
      class="optimization" 
      regexp="-[qQ]option (cg|iropt|f90comp|ube|CC) (-[^,\s]+),(-\S+)(?=\s|$)">
<example>Splitter rule for qoptions: -Qoption (cg|iropt|f90comp|ube) -switch[,-switch...] </example>
<include text="-qoption $1 $2" />
<include text="-qoption $1 $3" />
<display enable="0" />
</flag>

<flag name="Wx_splitter" 
      class="optimization" 
      regexp="-W(2|c|u|d),(-[^,\s]+),(-\S+)(?=\s|$)"
      compilers="sun_cc">
<example>Splitter rule for Wx: -W2,-switch[,-switch...] or -Wc,-switch[,-switch...]</example>
<include text="-W$1,$2" />
<include text="-W$1,$3" />
<display enable="0" />
</flag>

<!-- 
  ********************************************************************************************************************
  Other Splitters
  ********************************************************************************************************************* 
-->

<!-- ********************************************************************************************************************
     The regexp below looks for a string of the form

          -qoption iropt -Ainline:<something>:<more stuff>

     It removes what it found, and puts back in its place

          -qoption iropt -Ainline:<something> -qoption iropt -Ainline:<more stuff>

     After multiple iterations through, the original macro flag will have been split into its components (which should all be
     described below).

     ********************************************************************* -->

<!-- -Ainline[:cp=n][:cs=n][:inc=n][:irs=n][:mi][:rs=n][:recursion=n] --> 
<flag name="Ainline_splitter"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:([^:\s]+):(\S+)(?=\s|$)">
<example>Splitter rule for -Ainline</example>
<include text="$1-Ainline:$2" />
<include text="$1-Ainline:$3" />
<display enable="0" />
</flag>


<!-- gnana Apf not used in Opteron -->
<!-- -Apf:llist=n:noinnerllist  -->
<flag name="Apf_splitter"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Apf:([^:\s]+):(\S+)(?=\s|$)">
<example>Splitter rule for -Apf</example>
<include text="$1-Apf:$2" />
<include text="$2-Apf:$3" />
<display enable="0" />
</flag>

<flag name="Arestrict_g"
      class="optimization"
      regexp="(-W2,)-Arestrict_g">
<example>-W2,-Arestrict_g</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Assumes global pointers are not aliased (restricted).</p>
]]>
</flag>

<flag name="Adata_access"
      class="optimization"
      regexp="(-W2,)-Adata_access">
<example>-W2,-Adata_access</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Asked compiler folks for description TBD </p>
]]>
</flag>

<!-- gnana -Qlp not used in Opteron -->
<!-- -Qlp[=n][-av=n][-t=n][-fa=n][-fl=n][-ip=n] [-pt=weak][-ol=n] --> 
<flag name="Qlp_splitter1"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp(-|=)([^-\s]+)-(\S+)(?=\s|$)">
<example>Splitter rule for -Qlp</example>
<include text="$1-Qlp$2$3" />
<include text="$1-Qlp-$4" />
<display enable="0" />
</flag>

<!--
  *************************************************************************************************************************
  Flags

  Actual flag descriptions at last begin here.  The order is alphabetical by how the human reads it (so you might have to
  peek at that regexp to understand what it would look like to the human).  The alphabetizing is without regard to
  upper/lower case, without regard to the presence of leading punctuation, and without regard to the presence of a leading
  -Wx, or -qoption x

  Exception: The flag "-#" is alphabetized next to "-v".
  *************************************************************************************************************************
-->

<!-- Note that the name "F-Abcopy" allows a default <example> text of -Abcopy; see flags_description.html section 3.7 -->
<flag name="F-Abcopy"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Abcopy\b">
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Increase the probability that the compiler will perform memcpy/memset transformations.</p>
]]>
</flag>

<!-- Note that the regular expression above might have been written slightly more efficiently.  These two would do similar
     things:

          regexp="(-W2,|-[qQ]option iropt )-Abcopy\b"
     or
          regexp="-(?:W2,|[qQ]option iropt )-Abcopy\b">

     The former notation captures into $1; the latter does not, and also factors out the common substring "-".  Therefore,
     the latter might be slightly more efficient.  But it is not used here because the former seems a little easier on the human
     eye.   You can read up about the ?: notation by typing "specperldoc perlre" and can make your own decision of whether to
     use it (TMTOWTDI).  -->

<flag name="iropt_prof"
      class="optimization"
      regexp="(-Wd,|-[Qq]option CC )-iropt-prof\b">
<example>-Wd,-iropt-prof , -Qoption CC -iropt-prof</example>
<![CDATA[
<p><small>[global optimizer flag]</small></p>
<p> Use iropt in the profile phase of the compiler iropt is the Global optimizer.  </p>
]]>
</flag>

<!-- gnana -Addint not used in Opteron -->
<flag name="Addint:ignore_parallel"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Addint:ignore_parallel\b">
<example>-Addint:ignore_parallel</example>
<![CDATA[
<p><small>[optimizer]</small></p>
<p>Ignore parallelization factors in loop interchange heuristics.</p>
]]>
</flag>

<!-- gnana -Addint not used in Opteron -->
<flag name="Addint:sf"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Addint:sf=\d+\b">
<example>-Addint:sf=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer]</small></p>
<p>When considering whether to interchange loops, set memory store operation weight to <kbd>n</kbd>.  A higher value of
<kbd>n</kbd> indicates a greater performance cost for stores.</p>
]]>
</flag>

<flag name="Ainline:cp"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:cp=\d+\b">
<example>-Ainline:cp=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner; set the minimum call site frequency counter in order to consider a routine for
inlining.  </p>
]]>
</flag>

<flag name="Ainline:cs"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:cs=\d+\b">
<example>-Ainline:cs=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner; Set inline callee size limit to <kbd>n</kbd>.  The unit roughly corresponds to the
number of instructions.  </p>
]]>
</flag>

<flag name="Ainline:inc"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:inc=\d+\b">
<example>-Ainline:inc=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner;
The inliner is allowed to increase the size of the program by up to <kbd>n</kbd>%.  </p>
]]>
</flag>

<flag name="Ainline:irs"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:irs=\d+\b">
<example>-Ainline:irs=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner; Allow routines to increase by up to <kbd>n</kbd>.  The unit roughly corresponds to
the number of instructions.  </p>
]]>
</flag>

<flag name="Ainline:mi"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:mi\b">
<example>-Ainline:mi</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner; Perform maximum inlining (without considering code size increase).  </p>
]]>
</flag>

<flag name="Ainline:recursion"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:recursion=1\b">
<example>-Ainline:recursion=1</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Control the optimizer's loop inliner; Allow routines that are called recursively to still be eligible for inlining.  </p>
]]>
</flag>

<flag name="Ainline:rs"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ainline:rs=\d+\b">
<example>-Ainline:rs=400</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Inliner only considers routines smaller than n pseudo instructions as possible inline candidates.</p>
]]>
</flag>

<!-- gnana -Aivsub3 not used in Opteron -->
<flag name="F-Aivsub3"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Aivsub3\b">
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Increase the probability that loop induction variables will replaced, so that some extraneous code can be eliminated from
loops.</p>
]]>
</flag>

<!-- gnana -Aloop_dist not used in Opteron -->
<flag name="Aloop_dist:ignore_parallel"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Aloop_dist:ignore_parallel\b">
<example>-Aloop_dist:ignore_parallel</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p> Ignore parallelization factors in loop distribution heuristics.  </p>
]]>
</flag>

<!-- gnana -Amemopt not used in Opteron -->
<flag name="Amemopt:arrayloc"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Amemopt:arrayloc\b">
<example>-Amemopt:arrayloc</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p> Reconstruct array subscripts during memory allocation merging and data layout program transformation.  </p>
]]>
</flag>

<!-- gnana -Apf not used in Opteron -->
<flag name="Apf:llist"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Apf:llist=\d+\b">
<example>-Apf:llist=&lt;n&gt;</example>
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Do speculative prefetching for link-list data structures; perform prefetching <kbd>n</kbd> iterations ahead.  </p>
]]>
</flag>

<!-- gnana -Apf not used in Opteron -->
<flag name="Apf:noinnerllist"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Apf:noinnerllist\b">
<example>-Apf:noinnerllist</example>
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Do speculative prefetching for link-list data structures; do not attempt prefetching for innermost loops.  </p>
]]>
</flag>

<!-- gnana -Apf not used in Opteron -->
<flag name="Apf:pdl"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Apf:pdl=1\b">
<example>-Apf:pdl=1</example>
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Do prefetching for one-level indirect memory references.  </p>
]]>
</flag>

<!-- gnana -array_pad_rows_n not used in Opteron -->
<flag name="array_pad_rows_n"
      class="optimization"
      regexp="(-[qQ]option f90comp )-array_pad_rows,\d+\b" compilers="sun_f90">
<example>-array_pad_rows,&lt;n&gt;</example>
<![CDATA[
<p> Enable padding of arrays by <kbd>n</kbd>.  </p>
]]>
</flag>

<flag name="F-Ashort_ldst"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Ashort_ldst:ldld\b">
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Convert multiple short memory load operations into single long load operations.</p>
]]>
</flag>

<!-- gnana -Atile not used in Opteron -->
<flag name="Atile:skewp"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Atile:skewp(?:b\d+)?\b">
<example>-Atile:skewp[:b&lt;n&gt;]</example>
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Perform loop tiling which is enabled by loop skewing.  Loop skewing is a transformation that transforms a non-fully
interchangeable loop nest to a fully interchangeable loop nest.  The optional <kbd>b&lt;n&gt;</kbd> sets the tiling block
size to <kbd>n</kbd>.  </p>
]]>
</flag>

<!-- gnana -Atile not used, but may be used in Opteron -->
<flag name="Aujam:inner:g"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Aujam:inner=g\b">
<example>-Aujam:inner=g</example>
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Increase the probability that small-trip-count inner loops will be fully unrolled.  </p>
]]>
</flag>

<!-- gnana -crit not used in Opteron -->
<flag name="F-crit"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-crit\b">
<![CDATA[
<p><small>[optimizer flag]</small></p> 
<p> Enable optimization of critical control paths </p>
]]>
</flag>

<!-- gnana -dalign not, but may be used in Opteron -->
<!-- Here for the first time, we use "F-flagname" to allow both a default <example> and a defult regexp; see
flag_description.html sections 3.3.1 and 3.7 -->
<flag name="F-dalign"
      class="optimization">
Assume data is naturally aligned. 
</flag>

<!-- gnana -dalign not used in Opteron -->
<flag name="Dalloca:__builtin_alloca"
      class="optimization">
<example>-Dalloca=__builtin_alloca</example>
Used for 403.gcc:  allow use of compiler's internal builtin alloca.
</flag>

<flag name="F-depend"
      class="optimization"
      compilers="sun_f90">
<include flag="F-xdepend" />
Synonym for -xdepend.
</flag>

<!-- gnana -dalign not, but may be used in Opteron -->
<flag name="D__MATHERR_ERRNO_DONTCARE"
      class="optimization"
      compilers="sun_cc,sun_CC">
<![CDATA[
<p> Allows the compiler to assume that your code does not rely on setting of the <tt>errno</tt> variable.  </p>
]]>
</flag>

<!--  -xO5 -xarch=sse2 -xcache=64/64/2:1024/64/16 -xchip=opteron -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -nofstore -Qoption CC -iropt -Qoption CC -xcallee64 -->

<flag name="fast_CC"
      class="optimization"
      regexp="-fast\b" compilers="sun_CC">
<example>-fast</example>
A convenience option, this switch selects several other options that are described in this file.  
<include flag="F-fns" />
<include flag="fsimple"       flagtext="-fsimple=2" />
<include flag="ftrap_none" />
<include flag="xbuiltin_all" />
<include flag="F-xlibmil" />
<include flag="F-nofstore" />
<include flag="F-xlibmopt" />
<include flag="xO"            flagtext="-xO5" />
<include flag="xtarget"       flagtext="-xtarget=native" />
</flag>

<flag name="fast_cc"
      class="optimization"
      regexp="-fast\b" compilers="sun_cc">
<example>-fast</example>
A convenience option, this switch selects several other options that are described in this file.  
<include flag="D__MATHERR_ERRNO_DONTCARE" />
<include flag="F-dalign" />
<include flag="F-fns" />
<include flag="fsimple"         flagtext="-fsimple=2" />
<include flag="F-fsingle" />
<include flag="ftrap_none" />
<include flag="xalias_level_cc" flagtext="-xalias_level=basic" />
<include flag="xbuiltin_all" />
<include flag="F-xdepend" />
<include flag="F-xlibmil" />
<include flag="F-nofstore" />
<include flag="F-xlibmopt" />
<include flag="xO"              flagtext="-xO5" />
<include flag="xregs_frameptr"  flagtext="-xregs=no%frameptr" />
<include flag="xtarget"         flagtext="-xtarget=native" />
</flag>

<!-- f90 -fast ### -xO5 -xarch=sse2 -xcache=64/64/2:1024/64/16 -xchip=opteron 
-xprefetch=auto -dalign -fsimple=2 -fns=yes -ftrap=common -xlibmil -xlibmopt 
-nofstore -dryrun -->

<flag name="fast_f90"
      class="optimization"
      regexp="-fast\b" compilers="sun_f90">
<example>-fast</example>
A convenience option, this switch selects the following switches that are described in this file:
<include flag="F-dalign" />
<include flag="F-depend" />
<include flag="F-fns" />
<include flag="fsimple"         flagtext="-fsimple=2" />
<include flag="F-fsingle" />
<include flag="F-ftrap_common" />
<include flag="F-xlibmil" />
<include flag="F-xlibmopt" />
<include flag="F-nofstore" />
<include flag="xO"              flagtext="-xO5" />
<include flag="xprefetch"       flagtext="-xprefetch=auto" />
<include flag="xprefetch_level" flagtext="-xprefetch_level=2" />
<include flag="xtarget"         flagtext="-xtarget=native" />
</flag>

<flag name="F-fns"
      class="optimization">
Selects faster (but nonstandard) handling of floating point arithmetic exceptions and gradual underflow.
</flag>


<flag name="cc_fsimple3"
      class="optimization"
      compilers="sun_cc"
      regexp="-Wu,-fsimple=3\b">
<example>-Wu,-fsimple=3</example>
Allow optimizer to use x87 hardware instructions for sine,
cosine, and rsqrt.  The precision and rounding effects are
determined by the underlying hardware implementation, rather
than by standard IEEE754 semantics.
</flag>

<flag name="fsimple3"
      class="optimization"
      compilers="sun_CC,sun_f90"
      regexp="(?:-[Qq]option ube |-Wu,)-fsimple=3\b">
<example>-Qoption ube -fsimple=3</example>
Allow optimizer to use x87 hardware instructions for sine,
cosine, and rsqrt.  The precision and rounding effects are
determined by the underlying hardware implementation, rather
than by standard IEEE754 semantics.
</flag>

<flag name="fsimple"
      class="optimization"
      regexp="-fsimple=\d+\b">
<example>-fsimple=&lt;n&gt;</example>
<![CDATA[
<p> Controls simplifying assumptions for floating point arithmetic: </p>
   <ul>
   <li><kbd>-fsimple=0</kbd> permits no simplifying assumptions.  Preserves strict IEEE 754 conformance.</li>
   
   <li><kbd>-fsimple=1</kbd> allows the optimizer to assume:
   <ul>
      <li>The IEEE 754 default rounding/trapping modes do not change after process initialization.</li>
      <li>Computations producing no visible result other than potential floating-point exceptions may be deleted.</li>
      <li>Computations with Infinity or NaNs as operands need not propagate NaNs to their results. For example, x*0 may be
      replaced by 0.</li>
      <li>Computations do not depend on sign of zero.</li>
   </ul></li>
   
   <li><kbd>-fsimple=2</kbd> permits more aggressive floating point optimizations that may cause programs to produce
   different numeric results due to changes in rounding. Even with <b><kbd>-fsimple=2</kbd></b>, the optimizer still is not
   permitted to introduce a floating point exception in a program that otherwise produces none. 
   For example, <kdb>-fsimple=2</kdb> permits the optimizer to replace computations of x/y in a loop with x*z, where z=1/y.</li>
   </ul>
]]>
</flag>

<flag name="F-fsingle"
      class="optimization"
      compilers="sun_cc">
Evaluate float expressions as single precision.
</flag>

<flag name="F-ftrap_common"
      class="optimization">
Sets the IEEE 754 trapping mode to common exceptions (invalid, division by zero, and overflow).
</flag>

<flag name="ftrap_none"
      class="optimization"
      regexp="-ftrap=%none\b">
<example>-ftrap=%none</example>
Turns off all IEEE 754 trapping modes.
</flag>

<flag name="F-g"
      class="optimization"
      compilers="sun_cc,sun_f90">
Includes symbols in the executable.  If the optimization level is -xO3 or lower, some optimizations may be
disabled when -g is present.  At -xO4 or higher, full optimization is performed, even when -g is present.
</flag>

<flag name="F-g0"
      class="optimization"
      compilers="sun_CC">
Includes symbols in the executable.  If the optimization level is -xO3 or lower, some optimizations may be
disabled when -g0 is present.  At -xO4 or higher, full optimization is performed, even when -g0 is present.
</flag>

<flag name="F-lbsdmalloc"
      class="optimization">
Links in a library of general purpose memory allocation routines which can be faster than those found in libc, at the expense
of more virtual memory consumed.
</flag>

<flag name="F-lfast"
      class="optimization">
This library provides faster versions of some common functions, such as malloc/free and bcopy.
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-ll2amm"
      class="optimization">
Include a library containing chip-specific memory routines.  
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-lmopt"
      class="optimization">
Include the optimized math library.  This option usually generates faster code, but may produce slightly different
results.  Usually these results will differ only in the last bit. 
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-lmvec"
      class="optimization">
Include a library with vectorized versions of some elementary mathematical functions.
</flag>

<flag name="F-lnsl" 
      class="forbidden" >
This library is necessary to get functions used for accessing name services.  As there are no network-enabled CPU2006
benchmarks, this flag should not be used.
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-lstlport4" 
      class="optimization"
      regexp="-library=stlport4">
Use STLport's Standard Library implementation instead of the default libCstd.
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-lsunmath" 
      class="optimization">
The libsunmath math library contains functions that are not specified by any standard but are useful in numerical software.
It also contains many of the functions that are in libm.so.2 but not in libm.so.1.
</flag>

<flag name="Mmapfile" 
      class="optimization" 
      regexp="-M /usr/lib/ld/map.bssalign">
<example>-M /usr/lib/ld/map.bssalign</example>
<![CDATA[
<p> Reads mapfile as a text file of directives to ld.</p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="F-noex"
      class="optimization"
      compilers="sun_CC">
Do not allow C++ exceptions.  A throw specification on a function is accepted but ignored; the compiler does not generate
exception code.  
</flag>

<flag name="F-nofstore"
      class="optimization">
Cancels forcing expressions to have the precision of the result.
</flag>

<flag name="F-O"
      class="optimization">
<include flag="xO" flagtext="-xO3" />
A synomym for -xO3.
</flag>


<flag name="ube-xcallee"
      class="optimization"
      regexp="(-[qQ]option ube )-xcallee=(?i:yes|no)\b">
<example>-Qoption ube -xcallee=yes</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p>Do not assume callee-save registers are saved. -xcallee=yes is the default.</p>
]]>
</flag>

<flag name="iropt_Rloop_dist"
      class="optimization"
      regexp="-[qQ]option iropt -Rloop_dist\b">
<example>-Qoption iropt -Rloop_dist</example>
<![CDATA[
<p><small>[optimizer flag]</small></p>
<p> Do not perform loop distribution transformations.</p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qdepgraph-early_cross_call"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qdepgraph-early_cross_call=1\b">
<example>-Qdepgraph-early_cross_call=1</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> There are several scheduling passes in the compiler.  This option allows early passes to move instructions across call
instructions.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qeps:do_spec_load"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qeps:do_spec_load=1\b">
<example>-Qeps:do_spec_load=1</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Allow the enhanced pipeline scheduler (EPS) to use speculative (non-faulting) loads.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qeps:enabled"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qeps:enabled=1\b">
<example>-Qeps:enabled=1</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Use enhanced pipeline scheduling (EPS) and selective scheduling algorithms for instruction scheduling.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qeps:rp_filtering_margin"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qeps:rp_filtering_margin=\d+\b">
<example>-Qeps:rp_filtering_margin=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> The number of live variables allowed at any given point is n more than the number of physical registers. Setting n to a
significantly large number (e.g., 100) will disable register pressure heuristics in EPS.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qeps:ws"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qeps:ws=\d+\b">
<example>-Qeps:ws=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Set the EPS window size, that is, the number of instructions it will consider across all paths when trying to find
independent instructions to schedule a parallel group.  Larger values may result in better run time, at the cost of increased
compile time.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qgsched-T"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qgsched-T[456]\b">
<example>-Qgsched-T&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Sets the aggressiveness of the trace formation, where <kbd>n</kbd> is 4, 5, or 6.  The higher the value of <kbd>n</kbd>,
the lower the branch probability needed to include a basic block in a trace.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qicache-chbab"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qicache-chbab=1\b">
<example>-Qicache-chbab=1</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Turn on optimization to reduce branch after branch penalty: nops will be inserted to prevent one branch from occupying
the delay slot of another branch.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qipa:valueprediction"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qipa:valueprediction\b">
<example>-Qipa:valueprediction</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Use profile feedback data to predict values and attempt to generate faster code along these control paths, even at the
expense of possibly slower code along paths leading to different values. Correct code is generated for all paths.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qiselect-funcalign"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qiselect-funcalign=\d+\b">
<example>-Qiselect-funcalign=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Do function entry alignment at <kbd>n</kbd>-byte boundaries.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qiselect-sw_pf_tbl_th"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qiselect-sw_pf_tbl_th=\d+\b">
<example>-Qiselect-sw_pf_tbl_th=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Peels the most frequent test branches/cases off a switch until the branch probability reaches less than 1/n. This is
effective only when profile feedback is used </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp=\d+(?=\s|$)">
<example>-Qlp=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; turns the module on (1) or off (0) (default is on for F90; off for C/C++) </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-av"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-av=\d+(?=\s|$)">
<example>-Qlp-av=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; sets the prefetch look ahead distance, in bytes.  The default is 256.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-fa"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-fa=\d+(?=\s|$)">
<example>-Qlp-fa=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; a setting of "1" means force user settings to override internally computed values.</p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-fl"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-fl=\d+(?=\s|$)">
<example>-Qlp-fl=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; a setting of "1" means force the optimization to be turned on for all languages.</p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-ol"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-ol=1(?=\s|$)">
<example>-Qlp-pt=weak</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Turns on prefetching for outer loops</p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-pt_weak"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-pt=weak(?=\s|$)">
<example>-Qlp-pt=weak</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; use weak prefetches in the general loop prefetch.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qlp-t"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-t=\d+(?=\s|$)">
<example>-Qlp-t=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p>Control irregular loop prefetching; sets the number of attempts at prefetching.  If not specified, <kbd>t=2</kbd> if
<kbd>-xprefetch_level=3</kbd> has been set; otherwise, defaults to <kbd>t=1</kbd>.  </p>
]]>
</flag>

<!-- In this flag, the '+' in the regexp is escaped with a backslash, because '+' is a special character.  Without that
backslash, this rule would match "-Qms_pipealldoall" or "-Qms_pipeeeeeeeeeeeeeealldoall", but NOT "-Qms_pipe+alldoall".  
-->

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe_alldoall"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe\+alldoall\b">
<example>-Qms_pipe+alldoall</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Specifies that all loops can be pipelined without needing to be concerned about loop-carried dependencies.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe_intdivusefp"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe\+intdivusefp\b">
<example>-Qms_pipe+intdivusefp</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> In pipelined loops, use floating point divide instructions for signed integer division.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe_prefolim"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe\+prefolim=\d+\b">
<example>-Qms_pipe+prefolim=&lt;n&gt;</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Set number of outstanding prefetches in pipelined loops to &lt;n&gt; </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe-pref_prolog" 
      class="optimization" 
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe-pref_prolog\b">
<example>-Qms_pipe-pref_prolog</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Turn off prefetching in the prolog of modulo scheduled loops.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe-prefst" 
      class="optimization" 
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe-prefst\b">
<example>-Qms_pipe-prefst</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Turn off prefetching for stores in the pipeliner.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe-prefstrong_0" 
      class="optimization" 
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe-prefstrong=0\b">
<example>-Qms_pipe-prefstrong=0</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Turn off the use of strong prefetches in modulo scheduled loops.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qms_pipe_unoovf"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qms_pipe\+unoovf\b">
<example>-Qms_pipe+unoovf</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Assert (to the pipeliner) that unsigned int computations will not overflow.  </p>
]]>
</flag>

<!-- gnana not used in Opteron -->
<flag name="Qpeep-Sh0" 
      class="optimization" 
      regexp="(-Wc,|-[qQ]option cg )-Qpeep-Sh0\b">
<example>-Qpeep-Sh0</example>
<![CDATA[
<p><small>[code generator flag]</small></p>
<p> Reduce the probability that the compiler will hoist sethi insructions out of loops.  </p>
]]>
</flag>

<flag name="F-stackvar" 
      class="optimization" 
      compilers="sun_f90">
Allocate routine local variables on the stack.
</flag>

<flag name="verbose_cc" 
      class="other" 
      regexp="-#(?=\s|$)" compilers="sun_cc">
<example>-#</example>
Turns on verbose mode, showing how command options expand. Shows each component as it is invoked.  
</flag>

<flag name="verbose_CC" 
      class="other" 
      regexp="-verbose=\S+\b">
<example>-verbose=diags,version</example>
<![CDATA[
<p>Controls compiler verbosity.  There are several values that can be used with this flag:</p>
<dl>
<dt>[no%]diags</dt>
<dd>[Do not] Print the command line for each compilation pass</dd> <dt>[no%]template</dt>
<dd>[Do not] Turn on the template instantiation <tt>verbose</tt> mode (sometimes called the "verify" mode). The 
<tt>verbose</tt> mode displays each phase of instantiation as it occurs during compilation.</dd>
<dt>[no%]version</dt>
<dd>[Do not] Direct the CC driver to print the names and version numbers of the programs it invokes.</dd>
<dt>%all</dt>
<dd>Invokes all of the above.</dd>
<dt>%none</dt>
<dd><tt>-verbose=%none</tt> is the same as <tt>-verbose=no%template,no%diags,no%version</tt>.</dd>
</dl>
<p>The default is <tt>-verbose=%none</tt>.</p>
]]>
</flag>

<flag name="verbose_diags_CC" 
      class="other" 
      regexp="-v\b" compilers="sun_CC">
<example>-v</example>
<![CDATA[
<p>Same as <tt>-verbose=diags</tt>.</p>
]]>
<include flag="verbose_CC" flagtext="-verbose=diags" /> 
</flag>

<flag name="verbose_f90" 
      class="other" 
      regexp="-v\b" compilers="sun_f90">
<example>-v</example>
This flag will cause the Fortran compiler to emit verbose messages.  
</flag>

<flag name="version_ccf90" 
      class="other" 
      regexp="-V\b" compilers="sun_cc,sun_f90">
<example>-V</example>
Directs the compiler to print the name and version ID of each component as the compiler executes.  
</flag>

<flag name="version_CC" 
      class="other" 
      regexp="-V\b" compilers="sun_CC">
<example>-V</example>
<![CDATA[
<p>Same as <tt>-verbose=version</tt>.</p>
]]>
<include flag="verbose_CC" flagtext="-verbose=version" /> 
</flag>

<flag name="X"
      class="optimization" 
      regexp="-X(a|c)"
      compilers="sun_cc">
<example>-X[a|c]</example>
Specifies the degree of conformance with the ISO C standard: -Xc indicates strict conformance, whereas -Xa indicates ISO C
plus some K&amp;R compatibility extensions.
</flag>

<flag name="xalias" 
      class="optimization" 
      regexp="-xalias\b"
      compilers="sun_f90">
<example>-xalias</example>
<![CDATA[
<p>Specify degree of aliasing to be assumed by the compiler. Specifying <kbd>-xalias</kbd> without a list gives the best performance for most programs that do not violate Fortran aliasing rules, and corresponds to: <kbd> -xalias=no%dummy,no%craypointer,no%actual,no%overindex,no%ftnpointer</kbd>
</p>
<ul>
   <li><b><kbd>no%dummy</kbd></b> Usage of dummy parameters follows the Fortran standard and may not alias each other or global variables. </li>
   <li><b><kbd>craypointer</kbd></b> Cray pointers can point at any global variable or a local variable whose address is taken by the LOC() function.</li>
   <li><b><kbd>no%actual</kbd></b> Passing an argument does not result in further aliasing. </li>
   <li><b><kbd>no%overindex</kbd></b> Array bounds are not violated.  Array references do not reference other variables.  </li>
   <li><b><kbd>no%ftnpointer</kbd></b> Fortran pointers follow the rules of the standard.</li>
</ul>
]]>
</flag>

<flag name="xalias_level_cc" 
      class="optimization" 
      regexp="-xalias_level=(?:basic|std|strong)\b"
      compilers="sun_cc">
<example>-xalias_level=[basic|std|strong]</example>
<![CDATA[
<p> Allows the compiler to perform type-based alias analysis at the specified alias level: </p>
<ul>
   <li><b><kbd>basic</kbd></b> assume that memory references that involve different C basic types do not alias each
   other.</li>
   <li><b><kbd>std</kbd></b> assume aliasing rules described in the ISO 1999 C standard.</li>
   <li><b><kbd>strong</kbd></b> in addition to the restrictions at the <kbd>std</kbd> level, assume that pointers of type
   <kbd>char *</kbd> are used only to access an object of type char; and assume that there are no interior pointers.</li>
</ul>
]]>
</flag>

<flag name="xalias_level_CC" 
      class="optimization" 
      regexp="-xalias_level(?:=any|=simple|=compatible)?\b" 
      compilers="sun_CC">
<example>-xalias_level[=any|simple|compatible]</example>
<![CDATA[
<p>Allows the compiler to perform type-based alias analysis:</p>
<ul>
  <li><b><kbd>any</kbd></b> assumes that any type can alias any other</li>
  <li><b><kbd>simple</kbd></b> assumes that fundamental types are not aliased</li>
  <li><b><kbd>compatible</kbd></b> assumes that layout-incompatible types are not aliased. If you specify -xalias_level without any values, the compiler sets it to -xalias_level=compatible.</li>
</ul>
]]>
</flag>

<flag name="xarch" 
      class="optimization" 
      regexp="-xarch=(?:sse2|sse2a|amd64a|amd64|native|generic)\b">
<example>-xarch=[sse2|amd64a|amd64|native|generic]</example>
<![CDATA[
<p> Specifies which instructions can be used.  Among the choices are:</p>
<ul>
   <li><kbd><b>sse2</b></kbd>Adds the SSE2 instruction set</li>
   <li><kbd><b>amd64</b></kbd>Compile 64-bit Solaris x86 applications.</li>
   <li><kbd><b>amd64a</b></kbd>Adds the AMD extensions to the AMD64 architecture and generates 64-bit ELF format binary file.</li>
   <li><kbd><b>native</b></kbd> Use the instructions available on the current processor</li>
   <li><kbd><b>generic</b></kbd>This option generates 32-bit applications. This is default.</li>
</ul>
]]>
</flag>

<flag name="F-xautopar" 
      class="optimization">
Turn on automatic parallelization for multiple processors.
</flag>

<flag name="xbuiltin_all" 
      class="optimization" 
      regexp="-xbuiltin=%all\b" 
      compilers="sun_cc,sun_CC">
<example>-xbuiltin=%all</example>
Substitute intrinsic functions or inline system functions where profitable for performance.
</flag>

<flag name="xbuiltin_none" 
      class="optimization" 
      regexp="-xbuiltin=%none\b" 
      compilers="sun_cc,sun_CC">
<example>-xbuiltin=%none</example>
Specifies no functions from the standard libraries are substituted or inlined.
</flag>

<flag name="xchip" 
      class="optimization" 
      regexp="-xchip=(?:opteron|native|generic)\b">
<example>-xchip=[opteron|native|generic]</example>
<![CDATA[
<p> xchip determines timing properties that are assumed by the compiler.  It does not limit which instructions are allowed
(see xtarget for that).  Among the choices are:</p>
<ul>
   <li><kbd><b>opteron</b></kbd> Optimize for the AMD Opteron processor</li>
   <li><kbd><b>native</b></kbd> Optimize for the current processor</li>
   <li><kbd><b>generic</b></kbd> Optimize for the most x86 platforms</li>
</ul>
]]>
</flag>

<flag name="F-xdepend" 
      class="optimization" >
Analyze loops for inter-iteration data dependencies, and do loop restructuring. 
</flag>

<!-- gnana not used in Opteron -->
<flag name="xinline_" 
      class="optimization" 
      regexp="-xinline=(?=\s|$)">
<example>-xinline=</example>
Turn off inlining.
</flag>

<flag name="xipo" 
      class="optimization" 
      regexp="-xipo(?:=\d+)\b">
<example>-xipo or -xipo=(0|1|2)</example>
<![CDATA[
<p> Perform optimizations across all object files in the link step: </p>
<ul>
<li><kbd>0</kbd> = off</li>
<li><kbd>1</kbd> = on</li>
<li><kbd>2</kbd> = performs whole-program detection and analysis.</li>
</ul>
<p>At -xipo=2, the compiler performs inter-procedural aliasing analysis as well as optimization of memory allocation and
layout to improve cache performance.  </p>
]]>
</flag>

<flag name="xjobs"
      class="other"
      regexp="-xjobs=\d+\b">
<example>-xjobs=&lt;n&gt;</example>
<![CDATA[
<p>Specify the <tt>-xjobs</tt> option to set how many processes the compiler creates to complete its work. Currently,
<tt>-xjobs</tt> works only with the <tt>-xipo</tt> option. When you specify <tt>-xjobs=</tt><i>n</i>, the interprocedural
optimizer uses <i>n</i> as the maximum number of code generator instances it can invoke to compile different files.
</p>
]]>
</flag>

<flag name="F-xlibmil" 
      class="optimization" >
Use inline expansion for math library, libm.
</flag>

<flag name="F-xlibmopt" 
      class="optimization" 
      compilers="sun_CC,sun_f90">
Select the optimized math library.
</flag>

<flag name="F-xlic_lib:sunperf" 
      class="optimization">
Link with Sun supplied licensed sunperf library.
</flag>

<flag name="F-xlinkopt" 
      class="optimization" >
Perform link-time optimizations, such as branch optimization and cache coloring.
</flag>

<flag name="xO" 
      class="optimization" 
      regexp="-xO\d+\b">
<example>-xO&lt;n&gt;</example>
<![CDATA[
<p> Specify optimization level <kbd>n</kbd>: </p>
<ul>
  <li><kbd>-xO1</kbd> does only basic local optimizations (peephole.)</li>
  <li><kbd>-xO2</kbd> Do basic local and global optimizations, such as induction variable elimination, common subexpression
  elimination, constant propogation, register allocation, and basic block merging.</li>
  <li><kbd>-xO3</kbd> Add global optimizations at the function level, loop unrolling, and software pipelining.</li>
  <li><kbd>-xO4</kbd> Adds automatic inlining of functions in the same file.</li>
  <li><kbd>-xO5</kbd> Uses optmization algorithms that may take significantly more compilation time or that do not have as
  high a probability of improving execution time, such as speculative code motion.</li>
</ul>
]]>
</flag>

<flag name="xpad_common" 
      class="optimization" 
      regexp="-xpad=common(?::\d+)?\b" 
      compilers="sun_f90">
<example>-xpad=common[:&lt;n&gt;]</example>
<![CDATA[
<p> If multiple arrays are placed in common, insert padding between them for better use of cache.  <tt>n</tt> specifies the
amount of padding to apply, in units that are the same size as the array elements.  If no parameter is specified then the
compiler selects one automatically.  </p>
]]>
</flag>

<flag name="F-xpad:local" 
      class="optimization" 
      compilers="sun_f90">
Pad local variables, for better use of cache.
</flag>

<flag name="xpagesize" 
      class="optimization" 
      regexp="-xpagesize=\S+\b">
<example>-xpagesize=&lt;n&gt;</example>
Set the preferred page size for running the program.
</flag>

<flag name="xpagesize_stack" 
      class="optimization" 
      regexp="-xpagesize_stack=\S+\b" >
<example>-xpagesize_stack=&lt;n&gt;</example>
Set the preferred stack page size for running the program.
</flag>

<flag name="xprefetch" 
      class="optimization" 
      regexp="-xprefetch(?:=(?:[^,\s]+)(?:,[^,\s]+)*)?\b">
<example>-xprefetch[=val[,val]]</example>
<![CDATA[
<p>Enable generation of prefetch instructions on those architectures that support prefetch.  <kbd>val</kbd> may be one of the following:</p>
<ul>
    <li><kbd>auto</kbd> - Enable automatic generation of prefetch instructions</li>
    <li><kbd>no%auto</kbd> - Disable automatic generation of prefetch instructions</li>
    <li><kbd>explicit</kbd> - Enable explicit prefetch macros (SPARC only)</li>
    <li><kbd>no%explicit</kbd> - Disable explicit prefetch macros (SPARC only)</li>
    <li><kbd>latx:&lt;n&gt;</kbd> - Adjust the compiler's assumptions about prefetch latency by the specified factor.
                                    Typically values in the range of 0.5 to 2.0
                                    will be useful.  A lower number might
                                    indicate that data will usually be cache
                                    resident; a higher number might indicate a
                                    relatively larger gap between the processor
                                    speed and the memory speed (compared to the
                                    assumptions built into the compiler).</li>
</ul>
<p>If only <kbd>-xprefetch</kbd> is specified, <kbd>-xprefetch=auto,explicit</kbd> is assumed.</p>
]]>
</flag>

<flag name="F-xprefetch_auto_type:indirect_array_access"
            class="optimization">
Generate indirect prefetches for data arrays accessed indirectly.
</flag>

<flag name="xprefetch_level" 
      class="optimization" 
      regexp="-xprefetch_level=[123]\b">
<example>-xprefetch_level=&lt;n&gt;</example>
<![CDATA[
<p> Control the level of searching that the compiler does for prefetch opportunities by setting <kbd>n</kbd> to 1, 2, or 3,
where higher numbers mean to do more searching.  The default for Fortran is 2. The default for C and C++ is 1.  </p>
]]>
</flag>

<flag name="xprofile_collect" 
      class="optimization" 
      regexp="-xprofile=collect(:\S+)?\b">
<example>-xprofile=collect[:directory]</example>
Collect profile data for feedback-directed optimization (FDO).  If an option  directory is named, the feedback will be stored there.

When FDO is used, the training run gathers information
regarding execution paths.  As of the Sun Studio 11 version
of the compiler suite, the training run gathers information
about data values on SPARC systems, but not on x86 systems.
Hardware performance counters are not used.  FDO improves
existing optimizations but does not introduce new classes of
optimization. 

</flag>

<flag name="xprofile_use" 
      class="optimization" 
      regexp="-xprofile=use(:\S+)?\b">
<example>-xprofile=use[:directory]</example>
Use data collected for profile feedback.  If an option directory is named, look for the feedback data there.
</flag>

<flag name="F-xreduction" 
      class="optimization" 
      compilers="sun_cc,sun_f90">
Analyze loops for reductions such as dot products, maximum and minimum finding.
</flag>

<flag name="xregs_frameptr" 
      class="optimization" 
      regexp="-xregs=(?:no%|)frameptr\b">
<example>-xregs=frameptr</example>
Allow the compiler to use the frame-pointer register (%ebp on IA32, %rbp on AMD64) 
as an unallocated callee-saves register. 
</flag>

<flag name="F-xrestrict" 
      class="optimization">
Treat pointer-valued function parameters as restricted pointers. 
</flag>

<flag name="F-xsafe:mem" 
      class="optimization" >
<![CDATA[
<p> Enables the use of non-faulting loads when used in conjunction with <b><kbd>-xarch=v8plus</kbd></b>. Assumes that no
memory based traps will occur.  </p>
]]>
</flag>

<flag name="xtarget" 
      class="optimization" 
      regexp="-xtarget=\S+\b">
<example>-xtarget=native</example>
Selects options appropriate for the system where the compile is taking place, including architecture, chip, and cache
sizes.  (These can also be controlled separately, via -xarch, -xchip, and -xcache, respectively.) 
</flag>

<flag name="xunroll" 
      class="optimization" 
      regexp="-xunroll=\d+\b">
<example>-xunroll=&lt;n&gt;</example>
<![CDATA[
<p>Enable unrolling loops n times where possible.</p>
<p>Synonym for <kbd>-unroll=n</kbd></p>
]]>
</flag>

<flag name="unroll" 
      class="optimization" 
      regexp="-unroll=\d+\b">
<example>-unroll=&lt;n&gt;</example>
Enable unrolling loops n times where possible.
</flag>

<flag name="xcrossfile" 
      class="optimization" 
      regexp="-xcrossfile\b">
<example>-xcrossfile</example>
Enable optimization and inlining across source files
</flag>

<flag name="xvector" 
      class="optimization" 
      regexp="-xvector(?i:=yes|=lib|=simd)?(?=\s|$)">
<example>-xvector, -xvector=yes, -xvector=lib, -xvector=simd</example>
<![CDATA[
<p> Allow the compiler to transform math library calls within loops into calls to the vector math library.   Specifying</p>
<ul>
<li><kbd>-xvector</kbd> is equivalent to <kbd>-xvector=yes</kbd>. 
If you specify <kdb>-xvector</kdb>, but do not provide a flag, the compiler 
assumes <kdb>-xvector=lib</kbd>.</li>
<li><kbd>-xvector=lib</kbd> Enables the compiler to transform math library calls within loops into single calls to the equivalent vector math routines when such transformations are possible.</li>
<li><kbd>-xvector=simd</kbd> Directs the compiler to use the native x86 SSE SIMD instructions to improve performance of certain loops. </li>
</ul>
]]>
</flag>

</flagsdescription>

