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

<!-- This flags file is both an example for the SPEC CPU 2026 documentation and a useful flags file for results with LLVM.

................ You will want a nice wide window when reading this file ........................................................

     The first three lines at the top must be exactly as shown.  They claim that the file conforms to the DTD (Document Type
     Description) at the listed URL.  Results submitted to SPEC must use a well-formed flags file.  You can check your XML using
     a validating parser such as RXP, https://www.ltg.ed.ac.uk/~richard/rxp.html, also included in your kit as 'specrxp'.  See:
         https://www.spec.org/cpu2026/Docs/utility.html#specrxp.
     Or, you can use an on-line parser, such as:
         https://www.cogsci.ed.ac.uk/~richard/xml-check.html
         https://validator.w3.org/

     When results are displayed at www.spec.org, the XML file is transformed to HTML (using 'flags_dump', which is on your kit).
     You should ALSO validate the HTML version, which can be done at:
        https://validator.w3.org/
-->


<!-- This starts the fun.  -->
<flagsdescription>


<!-- filename   https://www.spec.org/cpu2026/Docs/flag-description.html#filename
                A complete (.rsf) result includes one or more embedded flags files.  When an embedded flags file is extracted, it
                will need a name.  The next line tells the tools what name to use when extracting.  -->
<filename>llvm-rev-A2</filename>


<!-- title    https://www.spec.org/cpu2026/Docs/flag-description.html#title
              All flag descriptions MUST have a title.  It'll be used as the page title for the full HTML version, and as for
              page headings in HTML reports.  -->
<title>SPEC CPU 2026 Compiler Flags for LLVM</title>


<!-- style    https://www.spec.org/cpu2026/Docs/flag-description.html#style
              The style section is entirely optional.  If the default styling is not to your taste, or if you need to add styles
              for elements in your flag descriptions, you may put it here.  As the contents should be HTML, it will save lots of
              time to just enclose the whole thing in a CDATA section.  See:
              https://www.spec.org/cpu2026/Docs/flag-description.html#CDATA -->
<style>
   <![CDATA[
   body { background: white; }
   ]]>
</style>


<!-- submit_command     https://www.spec.org/cpu2026/Docs/flag-description.html#submit_command
                        Information about settings, programs, or scripts used in conjunction with the submit facility can go in
                        the 'submit_command' section.  They'll be appended to the end of both the flags dump and per-result flag
                        report, right after the flags.  As the contents should be HTML, it will save lots of time to just
                        enclose the whole thing in a CDATA section.  See:
                        https://www.spec.org/cpu2026/Docs/flag-description.html#CDATA -->
<submit_command>
   <![CDATA[
   <p>SPECrate runs might use one of these methods to bind processes to specific processors, depending on the config file.</p>
   <ul>
      <li><p>Linux systems: the <samp>numactl</samp> command is commonly used. Here is a brief guide to understanding the specific
            command which will be found in the config file:</p>
         <ul>
            <li>syntax: <samp>numactl [--interleave=nodes] [--preferred=node] [--physcpubind=cpus] [--cpunodebind=nodes]
                  [--membind=nodes] [--localalloc] command args ...</samp>
            </li>
            <li><samp>numactl</samp> runs processes with a specific NUMA scheduling or memory placement policy.  The policy is set
               for a command and inherited by all of its children.
            </li>
            <li><samp>--localalloc</samp> instructs numactl to keep a process memory on the local node while <samp>-m</samp>
               specifies which node(s) to place a process memory.
            </li>
            <li><samp>--physcpubind</samp> specifies which core(s) to bind the process. In this case, copy 0 is bound to processor
               0, etc.
            </li>
            <li>For full details on using numactl, please refer to your Linux documentation, <samp>man numactl</samp>
            </li>
         </ul>
      </li>
      <li><p>macOS systems: processes are not bound.</p></li>
   </ul>
   ]]>
</submit_command>


<!-- sw_environment     https://www.spec.org/cpu2026/Docs/flag-description.html#sw_environment
                        Information about shell resources, environment variables, and other software options or installation
                        settings.  They'll be included in both the flags dump and per-result flag report.  As the contents should
                        be HTML, it will save lots of time to just enclose the whole thing in a CDATA section.  See:
                        https://www.spec.org/cpu2026/Docs/flag-description.html#CDATA -->
<sw_environment>
   <![CDATA[
   <p>One or more of the following may have been used in the run.  If so, it will be listed in the notes sections.  Here
      is a brief guide to understanding them:</p>
   <ul>

      <li><p><b><kbd>LD_LIBRARY_PATH=&lt;directories&gt;</kbd></b>  (set via config file <samp>preENV</samp>)
          <br>LD_LIBRARY_PATH controls the search order for libraries.  Often, it can be defaulted.  Sometimes, it is
             explicitly set (as documented in the notes in the submission) in order to ensure that the correct versions of
             libraries are picked up.</p>
      </li>

      <li><p><b><kbd>OMP_STACKSIZE=N</kbd></b> (set via config file <samp>preENV</samp>)
          <br>Set the stack size for subordinate OpenMP threads.</p>
      </li>

      <li><p><b><kbd>ulimit -s N</kbd></b>
          <br><b><kbd>ulimit -s unlimited</kbd></b>
          <br>'ulimit' is a Unix command, entered prior to the run.  It sets the stack size for the main process and its children,
             either to N kbytes or to no limit.</p>
      </li>

      <li><p><b><kbd>MALLOC_CONF=thp:always,metadata_thp:always</kbd></b> (set via config file <samp>preENV</samp>)
          <br>MALLOC_CONF controls jemalloc behavior.</p>
          <ol>
             <li><p>The "thp" option controls whether heap allocations jemalloc does use transparent huge pages, if THP is supported
                   by the operating system. The "always" setting enables transparent hugepage for all user memory mappings with
                   MADV_HUGEPAGE; "never" ensures no transparent hugepage with MADV_NOHUGEPAGE; the default setting "default" makes no
                   changes.</p>
             </li>
             <li><p>The "metadata_thp" option controls whether to allow jemalloc to use transparent huge pages (THP) for internal
                   metadata. The "always" setting allows such usage. The "auto" setting uses no THP initially, but may begin to do
                   so when metadata usage reaches certain level. The default is "disabled".</p>
             </li>
          </ol>
      </li>

   </ul>
   ]]>
</sw_environment>


<!-- fdo_settings      https://www.spec.org/cpu2026/Docs/flag-description.html#fdo_settings
                       Information about settings or programs used when doing feedback-directed optimization.  This section should
                       not be used to describe flags and settings already described by <flag> entries later in the file.  It is
                       intended primarily to describe settings for and programs used in fdo_* options.  They'll be included in
                       both the flags dump and per-result flag report.  As the contents should be HTML, it will save lots of time
                       to just enclose the whole thing in a CDATA section.  See
                       https://www.spec.org/cpu2026/Docs/flag-description.html#CDATA -->
<fdo_settings>
   <![CDATA[
   <p>No special commands are needed for feedback-directed optimization, other than the compiler <a
         href="#user_F-fprofile-generate">profile</a>&nbsp;&nbsp;<a href="#user_F-fprofile-use">flags</a>.</p>
   ]]>
</fdo_settings>


<!-- header            https://www.spec.org/cpu2026/Docs/flag-description.html#header
                       The header section is entirely optional.  If it is provided, and no class is specified, then it will be
                       inserted verbatim at the top of the flags dump and the per-result flag report.

                       If a class is specified, that text will be inserted verbatim before flags of that class in the flags dump.
                       It is omitted from the per-result flag report.
-->
<header>
<![CDATA[
<h2>Flag descriptions for LLVM</h2>

<p id="lnote"><b>Note:</b> The LLVM compilers provide a wide array of compiler options, occasionally described in detail and readily
   available at <a href="https://clang.llvm.org/docs/ClangCommandLineReference.html">
      https://clang.llvm.org/docs/ClangCommandLineReference.html</a> and <a
      href="https://flang.llvm.org/docs/FlangCommandLineReference.html">https://flang.llvm.org/docs/FlangCommandLineReference.html</a>.  This SPEC CPU flags file
   contains excerpts from and brief summaries of portions of that documentation.</p>

<p>SPEC's modifications are:<br>
   Copyright 2026 Standard Performance Evaluation Corporation</p>

<p>Permission is granted to copy, distribute and/or modify this document under
the terms of the <a href="https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT">Apache v2.0
License with LLVM Exceptions</a>.</p>

]]>
</header>


<!-- =============================================================================================================================
     flag       https://www.spec.org/cpu2026/Docs/flag-description.html#flag
                Descriptions of flags start here and continue to the end of the file.
                We begin with flags in the 'compiler' class, which get matched first.
     =============================================================================================================================
-->

<!-- Our first example is more complicated than most (sorry - but we want this flag to get processed first.)  Its function is
     to get rid of irrelevant detail about compiler paths, by matching them, and then throwing them away.

     flag name    https://www.spec.org/cpu2026/Docs/flag-description.html#flag_name
                  Each flag must have a unique name.  See additional discussion at flag 'clangxx', below.

     flag class   https://www.spec.org/cpu2026/Docs/flag-description.html#flag_class
                  Each flag must have a class.  See additional discussion of classes about 1 screenful further below.

     flag regexp  https://www.spec.org/cpu2026/Docs/flag-description.html#flag_regexp
                  The regexp is how you teach the SPEC tools to find your flags.  This example matches:
                    - A path string that starts and ends with "/" containing only non-blank characters, followed by
                    - a compiler name: one of 'clang', 'clang++', or 'flang', followed by
                    - white space or end of string: https://www.spec.org/cpu2026/Docs/flag-description.html#lookahead -->
<flag name="LLVM_compiler_path_eater"
     class="compiler"
    regexp="\S+/(clang|clang\+\+|flang|flang-new)(?:-\d+)?(?=\s|$)">
   <!-- We are still defining our flag.
        The opening tag had 3 attributes (name, class, regexp).  It has several more tags:
   -->
   <display enable="0" />  <!-- display        https://www.spec.org/cpu2026/Docs/flag-description.html#display
                                               This causes the text that was matched to be thrown away and not reported.  (The
                                               text can nevertheless be reviewed, and will be, if you submit your result to SPEC
                                               for publication on its website.)
                           -->
   <include text="$1" />   <!-- include text   https://www.spec.org/cpu2026/Docs/flag-description.html#include_text
                                               Wait, wait, we don't want to throw away everything; just the path.  The regexp
                                               captures the compiler name in $1; this line puts it back into the text stream.
                           -->
   <example>/path/to/{clang|clang++|flang}</example>
                           <!-- example        https://www.spec.org/cpu2026/Docs/flag-description.html#example
                                               Although results do not include this flag (because display enable=0), we need to
                                               print *something* when doing a flags dump (i.e. HTML rendering of this XML file).
                                               The 'example' gives us that something.
                           -->
</flag>                    <!-- Done defining this flag -->


<!-- flag class   https://www.spec.org/cpu2026/Docs/flag-description.html#flag_class
                  Every flag must have a class.  You can use 4 of them:

          class="compiler"       https://www.spec.org/cpu2026/Docs/flag-description.html#compiler_class
                                 Invocation string for the compiler (example: 'clang').  Other flags can be associated with a
                                 specific compiler using the compiler attribute. See the example below for flag '-g-clang'.
                                 Compare the "compiler class"
                                     vs. the "compilers attribute" at:
                                 https://www.spec.org/cpu2026/Docs/flag-description.html#compilers_attribute

          class="optimization"   https://www.spec.org/cpu2026/Docs/flag-description.html#optimization
                                 A flag that affects performance (example: '-O3')

          class="portability"    https://www.spec.org/cpu2026/Docs/flag-description.html#portability
                                 A flag which SPEC has approved for portability use, or which you plan to ask SPEC to approve,
                                 prior to any public use of your results (example: '-DSPEC_LINUX').  See:
                                 https://www.spec.org/cpu2026/Docs/runrules.html#portability

          class="other"           https://www.spec.org/cpu2026/Docs/flag-description.html#other
                                  Anything else (example: '-v' to control verbosity)

     flag text    https://www.spec.org/cpu2026/Docs/flag-description.html#flag_text
                  The flag below actually has a description!  At last, we start to accomplish what we came here to do: describe
                  flags.  Every flag must include descriptive text, except those that have 'display enable="0"'.  As the contents
                  should be HTML, it will save lots of time to just enclose the whole thing in a CDATA section.  See
                  https://www.spec.org/cpu2026/Docs/flag-description.html#CDATA
-->
<flag name="clang"
   regexp="\bclang(?:-\d+)?(?=\s|$)"
   class="compiler">
   <![CDATA[
   <p>Invokes the clang C compiler.  </p>
   ]]>
</flag>

<flag name="flang"
   regexp="\b(?:flang|flang-new)(?:-\d+)?(?=\s|$)"
   class="compiler">
   <![CDATA[
   <p>Invokes the flang Fortran compiler.</p>
   ]]>
</flag>

<!-- flag name    https://www.spec.org/cpu2026/Docs/flag-description.html#flag_name
                  The flag below is NOT given a name of 'clang++'; instead we use 'clangxx'.  The syntax rules for names are:
                   - Each flag must have a unique name.
                   - A flag name must begin with a letter, a colon, or an underscore.
                   - After that, it may be composed of letters, digits, periods, hyphens ('-'), underscores, or colons.
                   - Therefore:
                      * Flag names cannot begin with a slash or hyphen ('/' or '-').
                      * Flag names cannot include an equals sign
                   - Search for 'DefaultRE' to see how to pick flag names that automatically imply commonly-useful regular
                     expressions to match them.
-->
<flag name="clangxx"
   regexp="\bclang\+\+(?:-\d+)?(?=\s|$)"
   class="compiler">
   <example>clang++</example>
   <![CDATA[
   <p>Invokes the clang++ C++ compiler.</p>
   ]]>
</flag>

<!-- =============================================================================================================================
     All other flags are, for ease of maintenance, sorted into alphabetical order.
     Sorting is alphabetical by the flag as used in compile commands, without regard to
        - preceding punctuation
        - preceding 'no-'  (and -fno-mumble is alphabetized as -fmumble)
        - upper/lower case
        - preceding elements of a flag name that are not found in the compile command - i.e. 'F-' (explained a few lines down).
     Maintenance note: you can check with this:
           grep name= llvm.xml | perl -pe 's/<flag name="//;s/"\b*$//;s/^F//;s/^-fno-/-f/;s/^-//;' > /tmp/tmp1.tmp
           grep name= llvm.xml | perl -pe 's/<flag name="//;s/"\b*$//;s/^F//;s/^-fno-/-f/;s/^-//;' | sort -f > /tmp/tmp2.tmp
           vimdiff /tmp/tmp[12].tmp
     The only difference should be for the flags prior to this point, which must come first.
     =============================================================================================================================
-->

<flag name="F-D_FILE_OFFSET_BITS:64"
   class="portability">
   Ensure that there are no surprises if the benchmarks are run in an environment where file system metadata uses 64 bits.
</flag>

<!-- default regexp        https://www.spec.org/cpu2026/Docs/flag-description.html#DefaultRE
                           Often, a regexp is not needed.  A name that starts with "F-" automatically gets a regexp to match
                           everything after stripping the 'F'.
                           In addition, the first (and only the first) colon ':' will be replaced by an equals sign '=' in the
                           default regexp.  Thus the flag below matches '-fconvert=big-endian'.
-->
<flag name="F-fconvert:big-endian"
   class="portability">
   <![CDATA[
   <p>Use big-endian representation for unformatted files.  This is important when reading data files that were originally
     generated in big-endian format.</p>
   ]]>
</flag>

<flag name="F-ffast-math"
   class="optimization">
   <![CDATA[<p>
      Enables a range of optimizations that provide faster, though sometimes less precise, mathematical operations.
   </p>]]>
</flag>

<flag name="F-fno-fast-math"
   class="portability">
   <![CDATA[
   <p> Disables a range of optimizations that provide faster, though sometimes
      less precise, mathematical operations.</p>
   <p>A SPEC CPU config file might use this flag in combination with -Ofast, to specify that all the optimizations of
      -Ofast are desired, with the exception of -ffast-math.</p>
   <p>You may need to use this flag in order to get certain benchmarks to validate. If it is needed, the normal rules about
      <a href="https://www.spec.org/cpu2026/Docs/runrules.html#portability">portability flags</a> apply.</p>
   ]]>
</flag>

<flag name="F-fno-finite-math-only"
   class="portability">
   <![CDATA[
   <p>Do not allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or
      +-Infs.</p>
   <p>A SPEC CPU config file might use this flag in combination with -Ofast, to specify that all the optimizations of
      -Ofast are desired, with the exception of -ffinite-math-only.</p>
   <p>You may need to use this flag in order to get certain benchmarks to validate. If it is needed, the normal rules about
      <a href="https://www.spec.org/cpu2026/Docs/runrules.html#portability">portability flags</a> apply.</p>
   ]]>
</flag>

<flag name="F-fno-reciprocal-math"
   class="portability">
   <![CDATA[
   <p>Do not allow optimizations which require the reciprocal of a value to be used instead of dividing by the value.</p>
   <p>A SPEC CPU config file might use this flag in combination with -Ofast, to specify that all the optimizations of
      -Ofast are desired, with the exception of -freciprocal-math.</p>
   ]]>
</flag>

<flag name="F-fno-associative-math"
   class="portability">
   <![CDATA[
   <p>Do not allow reassociation of floating point operations.</p>
   <p>A SPEC CPU config file might use this flag in combination with -Ofast, to specify that all the optimizations of
      -Ofast are desired, with the exception of -fassociative-math.</p>
   ]]>
</flag>

<flag name="F-fomit-frame-pointer"
   class="optimization">
   <![CDATA[
   <p>Omit the frame pointer from functions that don't need it. Some stack unwinding cases, such as profilers and sanitizers, may
      prefer specifying -fno-omit-frame-pointer. On many targets, -O1 and higher omit the frame pointer by default.</p>
   ]]>
</flag>

<flag name="F-flto"
   class="optimization">
   Enable Link Time Optimization.
</flag>

<flag name="F-fopenmp"
   class="optimization"
   parallel="yes"
   >
   Enable handling of OpenMP directives and generate parallel code.
</flag>

<flag name="F-fopenmp-version"
   regexp="-fopenmp-version=(\d+)(?=\s|$)"
   class="optimization"
   >
   When OpenMP is enabled, this flag selects the version of the OpenMP standard to support.
</flag>

<flag name="do-concurrent-to-openmp"
   regexp="-fdo-concurrent-to-openmp=(?:host|device|none)(?=\s|$)"
   class="optimization"
   parallel="yes"
   >
   <![CDATA[
   <p>This flag enables mapping Fortran DO CONCURRENT loops to OpenMP. It has 3 possible values:</p>
   <ol>

      <li><kbd>host</kbd>: this maps <kbd>do concurrent</kbd> loops to run in parallel on the host CPU. This maps such loops to the
      equivalent of <kbd>omp parallel do</kbd>.
      </li>

      <li><kbd>device</kbd>: this maps <kbd>do concurrent</kbd> loops to run in parallel on a target device. This maps such loops to
      the equivalent of <kbd>omp target teams distribute parallel do</kbd> and may not be used for reportable CPU 2026 runs.
      </li>

      <li><kbd>none</kbd>: this disables <kbd>do concurrent</kbd> mapping altogether. In that case, such loops are emitted as
      sequential loops.
      </li>
   </ol>
   <p>The <kbd>-fdo-concurrent-to-openmp</kbd> compiler switch is currently available only when OpenMP is also enabled.</p>
   ]]>
</flag>

<flag name="F-fprofile-generate"
   class="optimization">
   <![CDATA[<p>
      Instruments code to collect information for profile-driven feedback.
      Information is collected regarding both code paths and data values.
   </p>]]>
</flag>

<flag name="F-fprofile-use"
   class="optimization">
   <![CDATA[<p>
      Applies information from a profile run in order to improve optimization.
      Several optimizations are improved when profile data is available, including branch probabilities, loop peeling, and loop
      unrolling.
   </p>]]>
</flag>

<flag name="F-fno-strict-aliasing"
class="optimization">
   <![CDATA[
      <p>The language standards set aliasing requirements: programmers are expected to follow conventions so that the
         compiler can keep track of memory.  If a program violates the requirements (for example, using pointer arithmetic),
         programs may crash, or (worse) wrong answers may be silently produced.</p>
      <p>The <samp>-fno-strict-aliasing</samp> switch instructs the optimizer that it must not assume that the aliasing
         requirements from the standard are met by the current program.
      </p>
   ]]>
</flag>

<!-- compilers attribute   https://www.spec.org/cpu2026/Docs/flag-description.html#compilers_attribute
                           The flag attribute 'compilers' limits the flag to matching only when considering text for the named
                           compilers.  Thus you can provide different descriptions for flags that look the same, but mean
                           different things.  For example, two compilers might have identical spelling for a '-g' switch, but it
                           would be performance-relevant to point out that '-g' suppresses certain optimizations for only one.
                           Compare the "compilers attribute"
                               vs. the "compiler class" at:
                           https://www.spec.org/cpu2026/Docs/flag-description.html#compiler_class
                        -->
<flag name="g-clang"
   regexp="-g(?:\d)?\b"
   compilers="clang,flang,clangxx"
   class="optimization">
   <example>-g</example>
   Produce debugging information.
</flag>

<flag name="L-libpath"
   regexp="-L\s*(\S+)(?=\s|$)"
   class="other"
   >
   <example>-L/path</example>
   Add the specified path to the list of paths that the linker will
   search for archive libraries and control scripts.
</flag>

<flag name="L-rpath"
   regexp="-rpath\s*(\S+)(?=\s|$)"
   class="other"
   >
   <example>-rpath /path</example>
   Add the specified path to the list of paths embedded in the binary
   that the linker will search by default when looking for library
   dependencies.
</flag>

<flag name="F-fuse-ld:lld"
   class="optimization"
   >
   <example>-fuse-ld=lld</example>
   This flag instructs the compiler driver to use LLVM's lld linker
   instead of the default (usually ld) linker.
</flag>

<flag name="stdlibcxx"
   regexp="-stdlib=libc\+\+"
   class="optimization">
   <![CDATA[<p>
   This selects the LLVM libc++ STL over the default GNU libstdc++.
   </p>]]>
</flag>

<flag name="static-libstdlibcxx"
   regexp="-static-libstdc\+\+"
   class="optimization">
This selects the LLVM libc++ STL static library over the dynamic library.
</flag>

<flag name="ljemalloc"
   regexp="-l\s*jemalloc\S*"
   class="optimization">
   <example>-ljemalloc, -ljemalloc_ext, ...</example>
   Link with libjemalloc, a fast, arena-based memory allocator.
</flag>

<flag name="lstdcfs"
   regexp="-lstdc\+\+fs"
   class="portability">
   <![CDATA[<p>
   On some systems, this flag is required to get support for std::filesystem.
   </p>]]>
</flag>

<flag name="F-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES"
   class="other">
   Setting this macro instructs the libc++ header files to minimize the number
   of header files that are included transitively (i.e. without being explicitly
   included by the source file being compiled). It's neither an optimization
   nor portability, as its only function is to identify cases where a function
   is used without its required header file being explicitly included. It
   should probably not be used for actual reportable runs. It's definitely not
   needed.
</flag>

<flag name="m32-clang"
   regexp="-m32"
   compilers="clang,flang,clangxx"
   class="optimization">
   <example>-m32</example>
   <![CDATA[<p>
      Compiles for a 32-bit (LP32) data model.
   </p>]]>
</flag>

<flag name="m64-clang"
   regexp="-m64"
   compilers="clang,flang,clangxx"
   class="optimization">
   <example>-m64</example>
   <![CDATA[<p>
      Compiles for a 64-bit (LP64) data model.
   </p>]]>
</flag>

<flag name="march"
   class="optimization"
   regexp="-march=(\S+)(?=\s|$)">    <!-- The end of this regexp is explained at
                                          https://www.spec.org/cpu2026/Docs/flag-description.html#lookahead -->
   <example>-march=core2,
      -march=athlon,
      -march=native...</example>     <!-- When printing a result file, the actual matched token '-march=whatever' is printed.
                                          When printing a flags dump (the HTML rendering of this file), there is nothing to
                                          match, so what can be printed?  The example.  -->
   <![CDATA[<p>
      On x86 systems, allows use of instructions that require the listed architecture.
   </p>]]>
</flag>

<flag name="mcpu"
   class="optimization"
   regexp="-mcpu=(\S+)(?=\s|$)">     <!-- The end of this regexp is explained at
                                          https://www.spec.org/cpu2026/Docs/flag-description.html#lookahead -->
   <example>-mcpu=cortex-a53,
      -mcpu=native...</example>      <!-- When printing a result file, the actual matched token '-mcpu=whatever' is printed.
                                          When printing a flags dump (the HTML rendering of this file), there is nothing to
                                          match, so what can be printed?  The example.  -->
   <![CDATA[<p>
      Depending on target system type, may be a synonym for <kbd>-mtune</kbd> or <kbd>-march</kbd>.
   </p>]]>
</flag>

<flag name="target"
   class="optimization"
   regexp="--target=(\S+)(?=\s|$)">     <!-- The end of this regexp is explained at
                                             https://www.spec.org/cpu2026/Docs/flag-description.html#lookahead -->
   <example>--target=aarch64-linux-android30</example>
Sets the target architecture and operating system when cross-compiling.
</flag>

<flag name="mtune"
   regexp="-mtune=(\S+)"
   class="optimization">
   <example>-mtune=niagara4, -mtune=athlon...</example>
   <![CDATA[<p>
      Tunes code based on the timing characteristics of the listed processor.
   </p>]]>
</flag>

<flag name="arch"
   regexp="-arch[\s=]+(\S+)"
   class="optimization">
   <example>-arch arm64</example>
   <![CDATA[<p>
      Specify the architecture which should be targeted. On some systems may be specified multiple times to make "fat" binaries.
   </p>]]>
</flag>

<flag name="F-Ofast"
   class="optimization">
   <![CDATA[<p>
      Enable all optimizations of -O3 plus optimizations that are not valid for standard-compliant programs, such as re-ordering
      operations without regard to parentheses.
      <br><a href="#lnote">Many more details are available</a>.
   </p>]]>
</flag>

<flag name="Olevel-clang"
   compilers="clang,flang,clangxx"
   regexp="-O\d\b"
   class="optimization">
   <example>-O1, -O2, -O3</example>
   <![CDATA[<p>
      Increases optimization levels: the higher the number, the more optimization is done.  Higher levels of optimization may
      require additional compilation time, in the hopes of reducing execution time.  At -O, basic optimizations are performed,
      such as constant merging and elimination of dead code.  At -O2, additional optimizations are added, such as common
      subexpression elimination and strict aliasing.  At -O3, even more optimizations are performed, such as function inlining and
      vectorization.
      <br><a href="#lnote">Many more details are available</a>.
   </p>]]>
</flag>

<flag name="Osilent-clang"
   compilers="clang,flang,clangxx"
   regexp="-O\b"
   class="optimization">
   Same as -O1
</flag>

<flag name="F-pthread"
   class="optimization"
   >
   <![CDATA[<p>
      Enable support for POSIX Threads.  Note that C++ programs using std::thread may require this flag.
   </p>]]>
</flag>

<flag name="std-clang"
   compilers="clang,clangxx,flang"
   class="optimization"
   regexp="-std=(\S+)(?=\s|$)"
   >
   <example>-std=&lt;version&gt;</example>
   <![CDATA[<p>
      Sets the language standard to the specified version, for example c18, c++17, f2008.
   </p>]]>
</flag>

<flag name="F-Wall"
   class="other">
   <![CDATA[<p>
      Enables warnings.
   </p>]]>
</flag>

<flag name="F-Wno-implicit-function-declaration"
   class="optimization">
   <![CDATA[<p>
     Disables warnings about functions lacking prototypes. <!-- On some systems this is a "fatal" warning. ? -->
   </p>]]>
</flag>

<flag name="Wl-rpath"
   class="optimization"
   regexp="-Wl,-rpath,(\S+)(?=\s|$)"
   >
   <example>-Wl,-rpath,/path/to/lib</example>
   Add the specified directory to the runtime library search path used
   when linking an ELF executable with shared objects.
</flag>


<!-- vim: set ai filetype=xml syntax=xml expandtab nosmarttab sw=3 colorcolumn=132: -->
</flagsdescription>
