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

<!--

   ***********************************************
   * Hey! Did you know that there is an order    *
   * to this file?  Please __maintain__ the      *
   * order when editing, for all our sanity :-)  * 
   *                                             *
   *    Preface for flags dump                   *
   *    Platform info                            *
   *       Boot-time, Bios settings              *
   *       /etc/system Settings                  *
   *       Environment/shell Variables           *
   *       The Submit Command                    *
   *    Compilers                                *
   *    Compiler Component Splitters             *
   *    Other Splitters                          *
   *    Flags                                    *
   *      "Mostly" alphabetical - please see     *
   *        note at top of section!              * 
   *                                             *
   * Sections are marked by '%%' (you can        *
   * search for it)                              *.
   ***********************************************


-->


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

<!-- This is a descendant of the flags file that was originally 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-OpenSolaris-Studio-x86_64</filename>

<title>Sun Microsystems SPEC CPU Flags: Sun-OpenSolaris-Studio-x86_64</title>

<!-- 
  *********************************************************************************************************************
  %% Preface for flags dump (not used in per-result reports)
  ********************************************************************************************************************* 
-->
<header>
<![CDATA[
<p>Compilers: Sun Studio 12 Update 1</p>
<p>Operating systems: OpenSolaris 2008.11</p>
<p>Last updated: 21-Apr-2009 jlh</p>


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

<p>This document has both optimization flags (in the immediately following section) and a description of 
<a href="#platf">Platform Settings</a></p>
]]>
</header>

<!-- 
  *********************************************************************************************************************
  %% Platform info, such as boot time settings
  ********************************************************************************************************************* 
-->

<platform_settings>
<![CDATA[

<h2 id="platf">Platform settings</h2>

<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>

<ul>
<li><a href="#boottime">Boot time, BIOS settings</a></li>
<li><a href="#etcsys">/etc/system</a></li>
<li><a href="#envvar">Environment/shell Variables</a></li>
<li><a href="#subm">The Submit Command</a></li>
</ul>


<!--  %% ................................. Boot-time, BIOS  ............................ -->

<h3 id="boottime" style="border-top:thin gray solid">Boot time, BIOS settings</h3>

<p><b><kbd>Intel VT-d: Disabled </kbd></b> 
<br />VT-d, if enabled, supports remapping of I/O DMA transfers for virtualization.</p>

<!--  %% ................................. /etc/system ................................. -->

<h3 id="etcsys" style="border-top:thin gray solid">/etc/system settings</h3>

<p><b><kbd>autoup=&lt;n&gt;</kbd></b> 
<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>lpg_alloc_prefer=&lt;n&gt;</kbd></b> 
<br /> 0 = the OS may allocate remote pages if the size requested is readily available in a remote locality group (default)
<br /> 1 = Set lgroup page allocation to strongly prefer local pages.  </p>

<p><b><kbd>maxusers=&lt;n&gt;</kbd></b> 
<br />To increase the number of user processes derived by the system</p>

<p><b><kbd>rlim_fd_cur=&lt;n&gt;</kbd></b> 
<br />Defines the soft limit on file descriptors that a single process can have open.</p>

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

<p><b><kbd>zfs:zfs_arc_max=&lt;n&gt;</kbd></b>
<br /> Controls the amount of memory used by ZFS for caching of file system buffers.</p>

<!--  %% ................................. Environment/shell variables ....................... -->

<h3 id="envvar" style="border-top:thin gray solid">Environment/shell variables</h3>

<p><b><kbd>OMP_DYNAMIC=&lt;TRUE|FALSE&gt;</kbd></b> 
<br /> Enables (TRUE) or disables (FALSE) dynamic adjustment of the number of threads available for execution of parallel
regions.  The default is TRUE.
</p>

<p><b><kbd>OMP_NESTED=&lt;TRUE|FALSE&gt;</kbd></b> 
<br /> Enables or disables nested parallelism.  Value is either TRUE or FALSE.  The default is FALSE.
</p>

<p><b><kbd>OMP_NUM_THREADS=&lt;n&gt;</kbd></b> 
<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>PARALLEL=&lt;n&gt;</kbd></b> 
<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> 
<br /> Set the size of the stack (temporary storage area) for each slave thread of a multithreaded program.  </p>

<p><b><kbd>SUNW_MP_PROCBIND=&lt;n&gt;</kbd></b> 
<br /> This environment variable can be used to bind the LWPs (lightweight processes) managed by the microtasking library,
libmtsk, to processors.  Performance can be enhanced with processor binding, but performance degradation will occur if
multiple LWPs are bound to the same processor.
<br />
The value for SUNW_MP_PROCBIND can be:</p>
<ul>
   <li>The string TRUE or FALSE (in any case).</li>
   <li>a non-negative integer.  </li>
   <li>a list of two or more non-negative integers separated by one or more spaces (" ").  </li>
   <li>two non-negative integers, n1 and n2, separated by a minus ("-"); n1 must be less than or equal to n2.</li>
</ul>
<p>Integers in the above denote the "logical" processor IDs to which the LWPs are to be bound.  Logical processor IDs are
consecutive integers that start with 0, and may or may not be identical to the actual processsor IDs. If n processors are
available online, then their logical processor IDs are 0, 1, ..., n-1.
<br />
By default, LWPs are not bound to processors. It is left up to the operating system, Solaris, to schedule LWPs onto processors.
<br />If the value "TRUE" is used, the operating system will bind processes to processors, starting with processor 0.
</p>

<p><b><kbd>SUNW_MP_THR_IDLE=SPIN</kbd></b> 
<br /> Controls the end-of-task status of each helper thread executing the parallel part of a program.  You can set the value
to spin, sleep ns, or sleep nms. The default is SPIN -- the thread spins (or busy-waits) after completing a parallel task
until a new parallel task arrives.</p>

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

<!--  %% ................................. The Submit Command .......................... -->

<h3 id="subm" style="border-top:thin gray solid">The Submit Command</h3>

<p><b><kbd>submit=echo 'pbind -b...' > dobmk; sh dobmk</kbd></b> 
<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>$SPECCOPYNUM</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 ( $SPECCOPYNUM / 4 ) * 8 + ($SPECCOPYNUM % 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>


]]>
</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="compiler_path_eater"
    class="compiler"
    regexp="/\S+/(CC|gcc|cc|f90|g\+\+)(?=\s|$)">
<example>/path/to/{CC|cc|f90}</example>
This flag is just to trim the path from the compiler line.
<include text="$1" />
<display enable="0" />
</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_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>


<!-- -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>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>Asked compiler folks for description TBD </p>
]]>
</flag>

<!-- -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

  Exceptions: 
       - The flag "-#" is placed next to "-v".
       - Everything related to the Apache C++ Standard Library is placed next to "-lstd"
  *************************************************************************************************************************
-->

<!-- 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>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="Addint:ignore_parallel"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Addint:ignore_parallel\b">
<example>-Addint:ignore_parallel</example>
<![CDATA[
<p>Ignore parallelization factors in loop interchange heuristics.</p>
]]>
</flag>

<flag name="Addint:sf"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Addint:sf=\d+\b">
<example>-Addint:sf=&lt;n&gt;</example>
<![CDATA[
<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>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>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>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>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>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>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>Inliner only considers routines smaller than n pseudo instructions as possible inline candidates.</p>
]]>
</flag>

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

<flag name="aligncommon"
      class="optimization" 
      regexp="-aligncommon=\d+\b">
<example>-aligncommon=&lt;n&gt;</example>
<![CDATA[
<p> Controls the alignment of data in common blocks and standard numeric sequence types.  
The value specified indicates the maximum alignment (in bytes) for data elements within common 
blocks and standard numeric sequence types. </p>
]]>
</flag>

<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> Ignore parallelization factors in loop distribution heuristics.  </p>
]]>
</flag>

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

<flag name="Aparallel:nthreads"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Aparallel:nthreads=\d+\b">
<example>-Aparallel:nthreads=16</example>
<![CDATA[
<p>The option instructs the compiler on the number of threads to use for automatically parallelized regions. The nthreads
value is only applicable for parallelized regions in the modules that are compiled with this option. The value specified by
this option will override any values previously set by the OMP_NUM_THREADS or PARALLEL environment variable. The runtime
library may choose to alter the number of threads unless the environment variable OMP_DYNAMIC is set to false.</p>

<p>Note that this is a flag to the "iropt" component of the compilation system.  In general, flags may be sent to iropt using
"Qoption iropt" from the "f90" and "CC" commands; or using "-W2," from the "cc" command.</p>
]]>
</flag>


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

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

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

<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> Convert multiple short memory load operations into single long load operations.</p>
]]>
</flag>

<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> 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>

<flag name="Aujam"
      class="optimization"
      regexp="(-W2,|-[qQ]option iropt )-Aujam:(?i:inner|noinner)\b">
<example>-Qoption iropt -Aujam:noinner</example>
<![CDATA[
<p> Increase the probability that small-trip-count inner loops will be fully unrolled. </p>
]]>
</flag>

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

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

<!-- 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>

<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>

<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>

<!-- CC: Sun C++ 5.10 SunOS_i386 2009/04/01
 CC -fast -V -v tmp.cc 2>&1 | grep '###'

### -xO5 -xarch=sse4_2 -xcache=32/64/8:256/64/8:8192/64/16 -xchip=nehalem -xdepend=yes -fsimple=2 -fns=yes -ftrap=%none -xlibmil 
-xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -nofstore -xregs=frameptr 

(arch/cache/chip are from target=native)
-->

<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-fns" />
<include flag="fsimple"       flagtext="-fsimple=2" />
<include flag="ftrap_none" />
<include flag="xbuiltin_all" />
<include flag="F-nofstore" />
<include flag="F-xdepend" />
<include flag="F-xlibmil" />
<include flag="F-xlibmopt" />
<include flag="xO"            flagtext="-xO5" />
<include flag="xregs_frameptr"  flagtext="-xregs=no%frameptr" />
<include flag="xtarget"       flagtext="-xtarget=native" />
</flag>

<!-- cc: Sun C 5.10 SunOS_i386 2009/04/01
 cc -fast -V -# tmp.cc 2>&1 | grep '###'

### -xO5 -xchip=nehalem -xcache=32/64/8:256/64/8:8192/64/16 -xarch=sse4_2 -xdepend=yes -fsimple=2 -fns=yes -ftrap=%none
-xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -fsingle -xalias_level=basic -nofstore -xregs=frameptr 

(arch/cache/chip are from target=native)
-->

<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-fns" />
<include flag="fsimple"         flagtext="-fsimple=2" />
<include flag="F-fsingle" />
<include flag="ftrap_none" />
<include flag="F-nofstore" />
<include flag="xalias_level_cc" flagtext="-xalias_level=basic" />
<include flag="xbuiltin_all" />
<include flag="F-xdepend" />
<include flag="F-xlibmil" />
<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: Sun Fortran 95 8.4 SunOS_i386 2009/04/01
f90 -fast -V -v tmp.f 2>&1 | grep '###'
### -xO5 -xarch=sse4_2 -xcache=32/64/8:256/64/8:8192/64/16 -xchip=nehalem -dalign -fsimple=2 -fns=yes -ftrap=common -xlibmil
-xlibmopt -nofstore -xregs=frameptr 

(arch/cache/chip are from target=native)
-->

<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-fns" />
<include flag="F-nofstore" />
<include flag="fsimple"         flagtext="-fsimple=2" />
<include flag="F-ftrap_common" />
<include flag="F-xlibmil" />
<include flag="F-xlibmopt" />
<include flag="xO"              flagtext="-xO5" />
<include flag="xregs_frameptr"  flagtext="-xregs=no%frameptr" />
<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.
The spelling "-fns=yes" is equivalent to "-fns".
</flag>

<flag name="fsimple3"
      class="optimization"
      compilers="sun_CC,sun_f90,sun_cc"
      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 <kbd>-fsimple=2</kbd>, the optimizer still is not
   permitted to introduce a floating point exception in a program that otherwise produces none. 
   For example, <kbd>-fsimple=2</kbd> 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-fstore"
      class="optimization">
      compilers="sun_cc,sun_f90">
This option forces all floating-point expressions to the precision of the destination variable.
</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="iropt_prof"
      class="optimization"
      regexp="(-Wd,|-[Qq]option CC )-iropt-prof\b">
<example>-Wd,-iropt-prof , -Qoption CC -iropt-prof</example>
<![CDATA[
<p> Use iropt in the profile phase of the compiler iropt is the Global optimizer.  </p>
]]>
</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>

<flag name="libnostd"
      class="optimization"
      regexp="-library=no%Cstd">
Disables use of the compiler-provided Cstd header files. 
</flag>

<flag name="F-lmtmalloc"
      class="optimization">
Link with multi-threaded memory allocator library. Functions in this library provide concurrent access to  heap space.
</flag>

<flag name="F-ll2amm"
      class="optimization">
Include a library containing chip-specific memory routines.  
</flag>

<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>

<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>

<flag name="F-lstd"
      class="optimization"
      regexp="-l(std8D|std8d)">
<example>-lstd8D</example>
Link with the Apache C++ Standard Library ("stdcxx").  The conventions for naming libraries are described in the README that
comes with stdcxx; for example, "std8D" indicates a 64-bit shared library with optimization enabled; "std8d" is a 32-bit
shared library with optimization enabled.
</flag>

<flag name="Istd"
      class="optimization"
      regexp="-I\s*[^ ]*stdcxx[^ ]*">
Adds the directory for the Apache C++ Standard Library include files to the search path at compile time.  
</flag>

<flag name="Lstd"
      class="optimization"
      regexp="-L\s*[^ ]*stdcxx[^ ]*">
Adds the directory for the Apache C++ Standard Library to the search path at link time
</flag>

<flag name="Rstd"
      class="optimization"
      regexp="-R\s*[^ ]*stdcxx[^ ]*">
<![CDATA[
<p>Specifies library search directory for the Apache C++ Standard Library for use by the runtime linker.  The information is
recorded in the object file and passed to the runtime linker.</p>
]]>
</flag>

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

<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="F-Lsmartheap" class="optimization"
         regexp="-L\s*[^ ]+\s+-R\s*[^ ]+\s+-lsmartheap(_mt)*(64)*">
       <example>-L/data1/SmartHeap_9/lib -R/data1/SmartHeap_9/lib -lsmartheap</example>
<![CDATA[
<p>Link with MicroQuill's SmartHeap library for Solaris. This is a library that optimizes calls to new, delete, 
malloc and free.  </p>

<p>The -R flag specifies library search directories to the runtime linker.  The information is
recorded in the object file and passed to the runtime linker.</p>

<p>The version of SmartHeap that is used can be one of:
</p>
<ul>
<li><b>smartheap</b> - 32-bit</li>
<li><b>smartheap64</b> - 64-bit</li>
<li><b>smartheap_mt64</b> - 64-bit, multithreaded</li>
</ul>
]]>
</flag>


<flag name="F-lumem"
      class="optimization">
Usse object-caching memory allocation library
</flag>
<flag name="F-m32" 
      class="optimization">
Specifies the memory model for the compiled binary object. Use -m32 to create 32-bit executables and shared libraries.
The default is 32-bit.
</flag>

<flag name="F-m64" 
      class="optimization">
Specifies the memory model for the compiled binary object. Use -m64 to create 64-bit executables and shared libraries.
The default is 32-bit.
</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>

<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="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> There are several scheduling passes in the compiler.  This option allows early passes to move instructions across call
instructions.  </p>
]]>
</flag>

<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> Allow the enhanced pipeline scheduler (EPS) to use speculative (non-faulting) loads.  </p>
]]>
</flag>

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

<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> 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>

<flag name="Qeps:ws"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qeps:ws=\d+\b">
<example>-Qeps:ws=&lt;n&gt;</example>
<![CDATA[
<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>

<flag name="Qgsched-T"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qgsched-T[456]\b">
<example>-Qgsched-T&lt;n&gt;</example>
<![CDATA[
<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>

<flag name="Qicache-chbab"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qicache-chbab=1\b">
<example>-Qicache-chbab=1</example>
<![CDATA[
<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>

<flag name="Qipa:valueprediction"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qipa:valueprediction\b">
<example>-Qipa:valueprediction</example>
<![CDATA[
<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>

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

<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> 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>

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

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

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

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

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

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

<flag name="Qlp-t"
      class="optimization"
      regexp="(-Wc,|-[qQ]option cg )-Qlp-t=\d+(?=\s|$)">
<example>-Qlp-t=&lt;n&gt;</example>
<![CDATA[
<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".  
-->

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

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

<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> Set number of outstanding prefetches in pipelined loops to &lt;n&gt; </p>
]]>
</flag>

<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> Turn off prefetching in the prolog of modulo scheduled loops.  </p>
]]>
</flag>

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

<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> Turn off the use of strong prefetches in modulo scheduled loops.  </p>
]]>
</flag>

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

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

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

<flag name="sched_first_pass"
      class="optimization"
      compilers="sun_cc,sun_f90,sun_CC"
      regexp="(?:-[Qq]option ube |-Wu,)-sched_first_pass=\d+\b">
<example>-Qoption ube -sched_first_pass=1</example>
<![CDATA[
<p>
-sched_first_pass=0  turns off first pass of instruction scheduler (second pass is off by default).
<br />-sched_first_pass=1  turns on first pass of instruction scheduler.
</p>
]]>
</flag>

<flag name="F-stackvar" 
      class="optimization" 
      compilers="sun_f90">
Allocate routine local variables on the stack.
</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="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|strict)\b"
      compilers="sun_cc">
<example>-xalias_level=[basic|std|strong|strict]</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>
   <li><b><kbd>strict</kbd></b> assume that memory references that involve types such as structs or unions, that are the same when tags are removed, can alias each other. Conversely, the compiler assumes that memory references involving types that are not the same even after tags are removed do not alias each other. </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=(?:sse|sse2|sse2a|sse4_2|amd64a|amd64|native|generic)\b">
<example>-xarch=[sse|sse2|sse2a|amd64a|amd64|native|generic]</example>
<![CDATA[
<p> Specifies which instructions can be used.  Among the choices are:</p>
<ul>
   <li><kbd><b>sse</b></kbd> Adds the SSE instruction set</li>
   <li><kbd><b>sse2</b></kbd> Adds the SSE2 instruction set</li>
   <li><kbd><b>sse2a</b></kbd> Adds the AMD extensions to the SSE2 instruction set</li>
   <li><kbd><b>sse4_2</b></kbd> Supports SSE4.2 instruction set</li>
   <li><kbd><b>amd64</b></kbd> Compile 64-bit Solaris x86 applications. Is equivalent to <kbd><b>-m64</b></kbd> <kbd><b>-xarch=sse2</b></kbd></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" parallel="yes">
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="xcallee"
      class="optimization"
      regexp="(-[qQ]option ube )-xcallee=(?i:yes|no)\b">
<example>-Qoption ube -xcallee=yes</example>
<![CDATA[
<p>Do not assume callee-save registers are saved. -xcallee=yes is the default.</p>
]]>
</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>native</b></kbd> Optimize for the current processor</li>
   <li><kbd><b>nehalem</b></kbd> Optimize for the Intel Nehalem processor</li>
   <li><kbd><b>opteron</b></kbd> Optimize for the AMD Opteron processor</li>
   <li><kbd><b>generic</b></kbd> Optimize for the most x86 platforms</li>
</ul>
]]>
</flag>

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

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

<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="-x*O\d+\b">
<example>-xO&lt;n&gt;</example>
<![CDATA[
<p> Specify optimization level.  Can be written either as <kbd>-xOn</kbd> or <kbd>-On</kbd>, where n indicates: </p>
<ul>
  <li><kbd>O1</kbd> does only basic local optimizations (peephole.)</li>
  <li><kbd>O2</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>O3</kbd> Add global optimizations at the function level, loop unrolling, and software pipelining.  For Fortran,
  includes dependence analysis (-xdepend) </li>
  <li><kbd>O4</kbd> Adds automatic inlining of functions in the same file.</li>
  <li><kbd>O5</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="xpagesize_heap" 
      class="optimization" 
      regexp="-xpagesize_heap=\S+\b" >
<example>-xpagesize_heap=&lt;n&gt;</example>
Set the preferred heap page size for running the program.
</flag>

<flag name="F-xpentium" 
      class="optimization" 
      compilers="sun_cc,sun_f90">
Generates code for the Pentium processor.
</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>
<p>The default is -xprefetch=auto,explicit.</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>
<![CDATA[
<p>Collect profile data for feedback-directed optimization (FDO).  If an option  directory is named, the feedback will be stored
there.</p>

<p> When FDO is used, the training run gathers information regarding execution paths.  As of the Sun Studio 12 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.
</p>
]]>
</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_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 x64) 
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="xvector" 
      class="optimization" 
      regexp="-xvector(?i:=yes|=lib|=simd|=lib,simd|=simd,lib)?(?=\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 <kbd>-xvector</kbd>, but do not provide a flag, the compiler 
assumes <kbd>-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>

