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

<flagsdescription>
        <filename>Bisheng-compiler-flags</filename>
        <title>Bisheng C/C++/Fortran Compiler Suite SPEC CPU2017 Flag Description</title>
        <style>
                <![CDATA[ body { background: white; } ]]>
        </style>
        <!--  SUBMIT COMMAND  -->
        <submit_command>
                <![CDATA[ <p><b>Using numactl to bind processes and memory to cores</b></p> ]]>
        </submit_command>
        <!--  /SUBMIT COMMAND  -->
        <!--  S/W ENVIRONMENT  -->
        <sw_environment>
                <![CDATA[ <p><b> ulimit -s &lt;n&gt;</b></p> <p> Sets the stack size to <b>n</b> kbytes, or <b>unlimited</b> to allow the stack size to grow without limit.</p> ]]>
        </sw_environment>
        <!--  /S/W ENVIRONMENT  -->
        <!--  HEADERs  -->
        <header>
                <![CDATA[ <h2>Compilers: Bisheng Compiler Suite</h2> ]]>
        </header>
        <!--  /HEADERs  -->
        <!--  OPTIMIZATION  -->
        <flag name="F-O0" class="optimization" regexp="-O0">
                <example>-O0</example>
                <![CDATA[ <p>Mean no optimization: this level compiles the fastest and generates the most debuggable code.</p> ]]>
                <include flag="F-O0"/>
        </flag>
        <flag name="F-O1" class="optimization" regexp="-O1">
                <example>-O1</example>
                <![CDATA[ <p>Somewhere between -O0 and -O2.</p> ]]>
        </flag>
        <flag name="F-O2" class="optimization" regexp="-O2">
                <example>-O2</example>
                <![CDATA[ <p>Moderate level of optimization which enables most optimizations.</p> ]]>
        </flag>
        <flag name="F-O3" class="optimization" regexp="-O3">
                <example>-O3</example>
                <![CDATA[ <p>Like -O2, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster).</p> ]]>
        </flag>
        <flag name="F-Ofast" class="optimization" regexp="-Ofast">
                <example>-Ofast</example>
                <![CDATA[ <p>Enable all the optimizations from -O3 along with other aggressive optimizations that may violate strict compliance with language standards.</p> ]]>
        </flag>
        <flag name="F-ffast-math" class="optimization" regexp="-ffast-math">
                <example>-ffast-math</example>
                <![CDATA[ <p>Yield faster code for programs that do not require the guarantees of IEEE or ISO rules/specifications.</p> ]]>
        </flag>
        <flag name="F-Wl-mllvm" class="optimization" regexp="-Wl,-mllvm,">
                <example>-Wl,-mllvm,option-name</example>
                <![CDATA[ <p>-Wl,-mllvm passes the named option to the linker, which in turn will pass it to LLVM.</p> ]]>
        </flag>
        <flag name="F-Wl" class="optimization" regexp="-Wl,">
                <example>-Wl,option-name</example>
                <![CDATA[ <p>-Wl passes the named option to the linker.</p> ]]>
        </flag>
        <flag name="F-mllvm" class="optimization" regexp="-mllvm">
                <example>-mllvm -option-name</example>
                <![CDATA[ <p>-mllvm passes the named option to LLVM.</p> ]]>
        </flag>
        <flag name="F-std" class="optimization" regexp="-std=c\+\+03">
                <example>-std=c++03</example>
                <![CDATA[ <p>Specify the language standard to compile for.</p> ]]>
        </flag>
        <flag name="F-mcpu" class="optimization" regexp="-mcpu=(tsv110|native)">
                <example>-mcpu=tsv110</example>
                <![CDATA[ <p>Specify the name of the target processor.</p> ]]>
        </flag>
        <flag name="F-mrecip" class="optimization" regexp="-mrecip=(div|sqrt)">
                <example>-mrecip=div</example>
                <![CDATA[ <p>Perform approximate reciprocal on div or sqrt.</p> ]]>
        </flag>
        <flag name="F-flto" class="optimization" regexp="-flto=(full|thin)">
                <example>-flto=full</example>
                <![CDATA[ <p>Generate output files in LLVM bitcode format, suitable for link time optimization.</p> ]]>
        </flag>
        <flag name="F-Mallocatable" class="optimization" regexp="-Mallocatable=(03|95)">
                <example>-Mallocatable=03</example>
                <![CDATA[ <p>Select Fortran 95/03 semantics for assignments to allocatable objects.</p> ]]>
        </flag>
        <flag name="F-fgnu89-inline" class="optimization" regexp="-fgnu89-inline">
                <example>-fgnu89-inline</example>
                <![CDATA[ <p>Use the gnu89 inline semantics.</p> ]]>
        </flag>
        <flag name="F-fno-strict-aliasing" class="optimization" regexp="-fno-strict-aliasing">
                <example>-fno-strict-aliasing</example>
                <![CDATA[ <p>Prohibit the compiler to assume the strictest aliasing rules applicable to the language being compiled.</p> ]]>
        </flag>
        <flag name="F-ljemalloc" class="optimization" regexp="-ljemalloc">
                <example>-ljemalloc</example>
                <![CDATA[ <p>Use the jemalloc library.</p> ]]>
        </flag>
        <flag name="F-lmathlib" class="optimization" regexp="-lmathlib">
                <example>-lmathlib</example>
                <![CDATA[ <p>Use the mathlib library.</p> ]]>
        </flag>
        <flag name="F-lpgmath" class="optimization" regexp="-lpgmath">
                <example>-lpgmath</example>
                <![CDATA[ <p>Link the Flang runtime library libpgmath.so. This is only needed explicitly when a C/C++ linker is used to link Fortran object files.</p> ]]>
        </flag>
        <flag name="F-lflangmain" class="optimization" regexp="-lflangmain">
                <example>-lflangmain</example>
                <![CDATA[ <p>Link the Flang runtime library libflangmain.so. This is only needed explicitly when a C/C++ linker is used to link Fortran object files.</p> ]]>
        </flag>
        <flag name="F-lflangrti" class="optimization" regexp="-lflangrti">
                <example>-lflangrti</example>
                <![CDATA[ <p>Link the Flang runtime library libflangrti.so. This is only needed explicitly when a C/C++ linker is used to link Fortran object files.</p> ]]>
        </flag>
        <flag name="F-lflang" class="optimization" regexp="-lflang">
                <example>-lflang</example>
                <![CDATA[ <p>Link the Flang runtime library libflang.so. This is only needed explicitly when a C/C++ linker is used to link Fortran object files.</p> ]]>
        </flag>
        <flag name="zmuldefs" class="optimization" regexp="(-z muldefs|-Wl,-z,muldefs)">
                <example>-z muldefs</example>
                <![CDATA[ <p>Allows links to proceed even if there are multiple definitions of some symbols.</p> ]]>
        </flag>
        <flag name="F-build-id" class="optimization" regexp="--build-id">
                <example>--build-id</example>
                <![CDATA[ <p>Request creation of ".note.gnu.build-id" ELF note section.</p> ]]>
        </flag>
        <flag name="F-Kieee" class="optimization" regexp="-Kieee">
                <example>-Kieee</example>
                <![CDATA[ <p>Instructs the compiler to conform to the IEEE-754 specifications.</p> ]]>
        </flag>
        <flag name="F-fno-finite-math-only" class="optimization" regexp="-fno-finite-math-only">
                <example>-fno-finite-math-only</example>
                <![CDATA[ <p>Prohibit optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs.</p> ]]>
        </flag>
        <flag name="F-fno-unsafe-math-optimizations" class="optimization" regexp="-fno-unsafe-math-optimizations">
                <example>-fno-unsafe-math-optimizations=</example>
                <![CDATA[ <p>Do not allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid, or (b) may violate IEEE or ANSI standards.</p> ]]>
        </flag>
        <flag name="F-enable-struct-padding" class="optimization" regexp="-enable-struct-padding=(false|true)">
                <example>-enable-struct-padding=false</example>
                <![CDATA[ <p>Enable padding of structures shortened by pointer compression.</p> ]]>
        </flag>
        <flag name="F-enable-struct-repacking" class="optimization" regexp="-enable-struct-repacking=(false|true)">
                <example>-enable-struct-repacking=false</example>
                <![CDATA[ <p>Enable repacking of structure elements.</p> ]]>
        </flag>
        <flag name="F-enable-loopinterchange-boole" class="optimization" regexp="-enable-loopinterchange-boole=(true|false)">
                <example>-enable-loopinterchange-boole=true</example>
                <![CDATA[ <p>Enable the LoopInterchange Pass.</p> ]]>
        </flag>
        <flag name="F-enable-loop-fusion" class="optimization" regexp="-enable-loop-fusion=(true|false)">
                <example>-enable-loop-fusion=true</example>
                <![CDATA[ <p>Enable the LoopFusion Pass for the Bisheng Compiler pipeline.</p> ]]>
        </flag>
        <flag name="F-insert-guard-for-residual-loop" class="optimization" regexp="-insert-guard-for-residual-loop=(true|false)">
                <example>-insert-guard-for-residual-loop=true</example>
                <![CDATA[ <p>Determine whether to activate the optimization in loop vectorization that inserts a guard block for the residual loop.</p> ]]>
        </flag>
        <flag name="F-licm-safe-hoist" class="optimization" regexp="-licm-safe-hoist=(true|false)">
                <example>-licm-safe-hoist=true</example>
                <![CDATA[ <p>When the flag is disable,the loop invariant instructions will be seen as safe to hoist, and be hoisted to preheader without cost considered. When flag is enable, hoist will be executed only when invariant instruction is guaranteed to be executed.</p> ]]>
        </flag>
        <flag name="F-enable-diamond-load-hoist" class="optimization" regexp="-enable-diamond-load-hoist=(true|false)">
                <example>-enable-diamond-load-hoist=true</example>
                <![CDATA[ <p>Enable optimization that hoists expressions from branches to a common dominator, using GVN (global value numbering) to discover expressions computing the same values.</p> ]]>
        </flag>
        <flag name="F-disable-extra-gate-for-loop-heuristic" class="optimization" regexp="-disable-extra-gate-for-loop-heuristic=(true|false)">
                <example>-disable-extra-gate-for-loop-heuristic=false</example>
                <![CDATA[ <p>Determine whether to apply the loop branch heuristic optimization without checks or apply it only when the loop count is large enough and the loop contains float point operators.</p> ]]>
        </flag>
        <flag name="F-enable-loop-load-widen" class="optimization" regexp="-enable-loop-load-widen=(true|false)">
                <example>-enable-loop-load-widen=true</example>
                <![CDATA[ <p>Enable wide load on certain loops with conditional breaks.</p> ]]>
        </flag>
        <flag name="F-enable-large-loop-bp-enhancement" class="optimization" regexp="-enable-large-loop-bp-enhancement=(true|false)">
                <example>-enable-large-loop-bp-enhancement=true</example>
                <![CDATA[ <p>Enable branch probability enhancement for large loops with small trip counts.</p> ]]>
        </flag>
        <flag name="F-hot-cold-split" class="optimization" regexp="-hot-cold-split=(true|false)">
                <example>-hot-cold-split=true</example>
                <![CDATA[ <p>Enable hot/cold splitting optimization to improve the memory locality of code. The splitting pass does this by identifying cold blocks and moving them into separate functions.</p> ]]>
        </flag>
        <flag name="F-enable-split-machine-functions" class="optimization" regexp="-enable-split-machine-functions=(true|false)">
                <example>-enable-split-machine-functions=true</example>
                <![CDATA[ <p>Splits functions into hot and cold parts.</p> ]]>
        </flag>
        <flag name="F-nonconstant-prefetch-stride" class="optimization" regexp="-nonconstant-prefetch-stride=(true|false)">
                <example>-nonconstant-prefetch-stride=true</example>
                <![CDATA[ <p>Support the nonconstant stride to add prefetches.</p> ]]>
        </flag>
        <flag name="F-aarch64-optimize-vector-mul" class="optimization" regexp="-aarch64-optimize-vector-mul=(true|false)">
                <example>-aarch64-optimize-vector-mul=true</example>
                <![CDATA[ <p>Enable NEON vector multiplication simplification.</p> ]]>
        </flag>
        <flag name="F-inline-threshold" class="optimization" regexp="-inline-threshold=\d+">
                <example>-inline-threshold=1000</example>
                <![CDATA[ <p>Control the amount of inlining to perform.</p> ]]>
        </flag>
        <flag name="F-force-vector-interleave" class="optimization" regexp="-force-vector-interleave=\d+">
                <example>-force-vector-interleave=1</example>
                <![CDATA[ <p>Control the unroll factor instead of using a cost model to decide it.</p> ]]>
        </flag>
        <flag name="F-unroll-force-peel-count" class="optimization" regexp="-unroll-force-peel-count=\d+">
                <example>-unroll-force-peel-count=</example>
                <![CDATA[ <p>Force a peel count regardless of profiling information.</p> ]]>
        </flag>
        <flag name="F-fopenmp" class="optimization" parallel="yes" regexp="-fopenmp">
                <example>-fopenmp</example>
                <![CDATA[ <p>Enable handling of OpenMP directives #pragma omp in C/C++ and !$omp in Fortran.</p> ]]>
        </flag>
        <flag name="F-fcommon" class="optimization" regexp="-fcommon">
                <example>-fcommon</example>
                <![CDATA[ <p>Place uninitialized global variables in a common block.</p> ]]>
        </flag>
        <flag name="F-fprofile-generate" class="optimization" regexp="-fprofile-generate=\S+\b">
                <example>-fprofile-generate=pathname</example>
                <![CDATA[ <p>Generate instrumented code to collect execution counts into pathname/default.profraw.</p> ]]>
        </flag>
        <flag name="F-fcs-profile-generate" class="optimization" regexp="-fcs-profile-generate=\S+\b">
                <example>-fcs-profile-generate=pathname</example>
                <![CDATA[ <p>generate the same profile as in the -fprofile-generate and -fprofile-generate= flags.The difference is that the instrumentation is performed after inlining so that the resulted profile has a better context sensitive information.</p> ]]>
        </flag>
        <flag name="F-fprofile-use" class="optimization" regexp="-fprofile-use=\S+\b">
                <example>-fprofile-use=pathname</example>
                <![CDATA[ <p>Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from pathname/default.profdata. Otherwise, it reads from file pathname.</p> ]]>
        </flag>
        <!--  OPTIMIZATION  -->
        <!--  PORTABILITY  -->
        <flag name="F-Mbyteswapio" class="portability" regexp="-Mbyteswapio">
                <example>-Mbyteswapio</example>
                <![CDATA[ <p>Swap byte-order for unformatted input/output.</p> ]]>
        </flag>
        <flag name="F-funsigned-char" class="portability" regexp="-funsigned-char">
                <example>-funsigned-char</example>
                <![CDATA[ <p>Let the type char be unsigned, like unsigned char.</p> ]]>
        </flag>
        <!--  PORTABILITY  -->
        <!--  COMPILER  -->
        <flag name="Fclang" class="compiler" regexp="\S+/clang(?=\s|$)">
                <example>clang</example>
                <![CDATA[ <p>Bisheng C compiler.</p> ]]>
        </flag>
        <flag name="Fclangxx" class="compiler" regexp="\S+/clang\+\+(?=\s|$)">
                <example>clang++</example>
                <![CDATA[ <p>Bisheng C++ compiler.</p> ]]>
        </flag>
        <flag name="Fflang" class="compiler" regexp="\S+/flang(?=\s|$)">
                <example>flang</example>
                <![CDATA[ <p>Bisheng Fortran compiler.</p> ]]>
        </flag>
        <!--  /COMPILER  -->
        <!--  OTHER  -->
        <flag name="Wno_return_type" class="other" regexp="-Wno-return-type">
                <example>-Wno-return-type</example>
                <![CDATA[ <p>Do not warn if a non-void function does not return a value.</p> ]]>
        </flag>
        <flag name="Verbose_option" class="other" regexp="-v">
                <example>-v</example>
                <![CDATA[ <p>Show commands to run and use verbose output.</p> ]]>
        </flag>
        <flag name="Linker_choose" class="other" regexp="-fuse-ld=(lld|gold)">
                <example>-fuse-ld=lld</example>
                <![CDATA[ <p>Tells the compiler to use a different linker instead of the default linker (ld).</p> ]]>
        </flag>
        <!--  OTHER  -->
</flagsdescription>
