[Compbench-devel] CompBenchmarks++/libcompbenchmarks/share/KB/gxx cse.xml, NONE, 1.1 description.xm
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-03-13 17:42:14
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30138 Added Files: cse.xml description.xml mainopt.xml options.xml Log Message: First import. --- NEW FILE: options.xml --- <?xml version="1.0" ?> <cel> <cel-include> <cel-str>common/common.xml</cel-str> <cel-str>gxx/mainopt.xml</cel-str> <cel-str>gxx/cse.xml</cel-str> </cel-include> <!-- Utility functions --> <!-- Returns 1 if the compiler on the stack is gcc or g++ --> <cel-function-def> <cel-str>kb-gxx-option-gxx-compiler</cel-str> <cel-var-set> <cel-str>compiler-id</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>return</cel-str> <cel-str>1</cel-str> </cel-var-set> <cel-cond-if> <cel-logic-not> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>compiler-id</cel-str> </cel-var-get> <cel-str>g++</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>compiler-id</cel-str> </cel-var-get> <cel-str>gcc</cel-str> </cel-cmp-eq> </cel-logic-or> </cel-logic-not> <cel-var-set> <cel-str>return</cel-str> <cel-str>g++ or gcc needed</cel-str> </cel-var-set> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> <!-- Returns 1 if the compiler version and the compiler-id on the stack --> <!-- match a gcc/g++ 2.95.0 or above --> <cel-function-def> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> <cel-var-set> <cel-str>compiler-version</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>compiler-id</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>return</cel-str> <cel-block> <cel-stack-push> <cel-var-get> <cel-str>compiler-id</cel-str> </cel-var-get> </cel-stack-push> <cel-function-call> <cel-str>kb-gxx-option-gxx-compiler</cel-str> </cel-function-call> </cel-block> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-var-set> <cel-str>return</cel-str> <cel-block> <cel-stack-push> <cel-version>2.95.0</cel-version> </cel-stack-push> <cel-stack-push> <cel-var-get> <cel-str>compiler-version</cel-str> </cel-var-get> </cel-stack-push> <cel-function-call> <cel-str>kb-common-option-version-is-compatible</cel-str> </cel-function-call> </cel-block> </cel-var-set> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> <!-- caller-saves --> <cel-function-def> <cel-str>kb-gxx-option-caller-saves-is-compatible</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-function-def> <!-- delayed-branch --> <cel-function-def> <cel-str>kb-gxx-option-delayed-branch-is-compatible</cel-str> <cel-var-set> <cel-str>return</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-cond-if> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O2</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O3</cel-str> </cel-cmp-eq> </cel-logic-or> <cel-var-set> <cel-str>return</cel-str> <cel-str>option implied by -O2 and -O3</cel-str> </cel-var-set> </cel-cond-if> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> <!-- expensive-optimizations --> <cel-function-def> <cel-str>kb-gxx-option-expensive-optimizations-is-compatible</cel-str> <cel-var-set> <cel-str>return</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-cond-if> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O2</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O3</cel-str> </cel-cmp-eq> </cel-logic-or> <cel-var-set> <cel-str>return</cel-str> <cel-str>option implied by -O2 and -O3</cel-str> </cel-var-set> </cel-cond-if> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> <!-- fast-math --> <cel-function-def> <cel-str>kb-gxx-option-fast-math-is-compatible</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-function-def> </cel> --- NEW FILE: description.xml --- <?xml version="1.0" ?> <!-- Options for 'gxx' (includes gcc and g++) --> <!-- cel-interface is gxx/options.xml by default and should be evaluated --> <!-- globaly; that's the default since all compilers'll have their --> <!-- own descriptions --> <options> <option id="O0"> <value>-O0</value> <short-description>Globally disable compiler optimization</short-description> <editor-description> Do not optimize. This is the default </editor-description> </option> <option id="Os"> <value>-Os</value> <short-description>Globally optimize for size</short-description> <editor-description> Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size. -Os disables the following optimization flags: -falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks -fprefetch-loop-arrays If you use multiple -O options, with or without level numbers, the last such option is the one that is effective. </editor-description> </option> <option id="O1"> <value>-O1</value> <short-description>Global optimization, level 1</short-description> <editor-description> Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function. Without `-O', the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code. Without `-O', only variables declared register are allocated in registers. The resulting compiled code is a little worse than produced by PCC without `-O'. With `-O', the compiler tries to reduce code size and execution time. When you specify `-O', the two options `-fthread-jumps' and `-fdefer-pop' are turned on. On machines that have delay slots, the `-fdelayed-branch' option is turned on. For those machines that can support debugging even without a frame pointer, the `-fomit-frame-pointer' option is turned on. On some machines other flags may also be turned on. </editor-description> </option> <option id="O2"> <value>-O2</value> <short-description>Global optimization, level 2</short-description> <editor-description> Optimize even more than -O1. Nearly all supported optimizations that do not involve a space-speed tradeoff are performed. Loop unrolling and function inlining are not done, for example. As compared to -O, this option increases both compilation time and the performance of the generated code. </editor-description> </option> <option id="O3"> <value>-O2</value> <short-description>Global optimization, level 3</short-description> <editor-description> Optimize yet more. This turns on everything -O2 does, along with also turning on -finline-functions. </editor-description> </option> <option id="caller-save"> <value>-fcaller-saves</value> <short-description>Try allocating registers that'll be cloberred by function calls</short-description> <editor-description> Enable values to be allocated in registers that will be clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls. Such allocation is done only when it seems to result in better code than would otherwise be produced. This option is enabled by default on certain machines, usually those which have no call-preserved registers to use instead. </editor-description> </option> <option id="cse-follow-jumps"> <value>-fcse-follow-jumps</value> <short-description>Always scan through jump instructions in common subexpression elimination</short-description> <editor-description> In common subexpression elimination, scan through jump instructions when the target of the jump is not reached by any other path. For example, when CSE encounters an if statement with an else clause, CSE will follow the jump when the condition tested is false. </editor-description> </option> <option id="cse-skip-blocks"> <value>-fcse-skip-blocks</value> <short-description>Always scan through conditionnal jump instructions in common subexpression elimination</short-description> <editor-description> This is similar to `-fcse-follow-jumps', but causes CSE to follow jumps which conditionally skip over blocks. When CSE encounters a simple if statement with no else clause, `-fcse-skip-blocks' causes CSE to follow the jump around the body of the if. </editor-description> </option> <option id="delayed-branch"> <value>-fdelayed-branch</value> <short-description>Attempt to reorder instructions to increase slot utilisation</short-description> <editor-description> If supported for the target machine, attempt to reorder instructions to exploit instruction slots available after delayed branch instructions. </editor-description> </option> <option id="expensive-optimizations"> <value>-fexpensive-optimizations</value> <short-description>Perform a number of minor optimizations</short-description> <editor-description> Perform a number of minor optimizations that are relatively expensive. </editor-description> </option> <option id="fast-math"> <value>-ffast-math</value> <short-description>Violate ANSI or IEEE rules/specifications for optimizing code</short-description> <editor-description> This option allows GCC to violate some ANSI or IEEE rules/specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the sqrt function are non-negative numbers. This option should never be turned on by any `-O' option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions. </editor-description> </option> <option id=""> <value></value> <short-description></short-description> <editor-description> </editor-description> </option> <option id=""> <value></value> <short-description></short-description> <editor-description> </editor-description> </option> <option id=""> <value></value> <short-description></short-description> <editor-description> </editor-description> </option> <option id=""> <value></value> <short-description></short-description> <editor-description> </editor-description> </option> <option id=""> <value></value> <short-description></short-description> <editor-description> </editor-description> </option> </options> --- NEW FILE: mainopt.xml --- <?xml version="1.0" ?> <!-- 'Main optimization' options for gxx --> <!-- included by gxx/options.xml --> <cel> <!-- Option related functions --> <!-- O0 --> <cel-function-def> <cel-str>kb-gxx-option-O0-is-compatible</cel-str> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-block> <cel-stack-push> <cel-str>kb-option-mainoptimization</cel-str> </cel-stack-push> <cel-stack-push> <cel-str>-O0</cel-str> </cel-stack-push> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-common-option-apply</cel-str> </cel-function-call> </cel-var-set> </cel-block> </cel-cond-if> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> </cel-function-def> <!-- Os --> <cel-function-def> <cel-str>kb-gxx-option-Os-is-compatible</cel-str> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-block> <cel-stack-push> <cel-str>kb-option-mainoptimization</cel-str> </cel-stack-push> <cel-stack-push> <cel-str>-Os</cel-str> </cel-stack-push> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-common-option-apply</cel-str> </cel-function-call> </cel-var-set> </cel-block> </cel-cond-if> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> </cel-function-def> <!-- O1 --> <cel-function-def> <cel-str>kb-gxx-option-O1-is-compatible</cel-str> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-block> <cel-stack-push> <cel-str>kb-option-mainoptimization</cel-str> </cel-stack-push> <cel-stack-push> <cel-str>-O1</cel-str> </cel-stack-push> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-common-option-apply</cel-str> </cel-function-call> </cel-var-set> </cel-block> </cel-cond-if> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> </cel-function-def> <!-- O2 --> <cel-function-def> <cel-str>kb-gxx-option-O2-is-compatible</cel-str> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-block> <cel-stack-push> <cel-str>kb-option-mainoptimization</cel-str> </cel-stack-push> <cel-stack-push> <cel-str>-O2</cel-str> </cel-stack-push> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-common-option-apply</cel-str> </cel-function-call> </cel-var-set> </cel-block> </cel-cond-if> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> </cel-function-def> <!-- O3 --> <cel-function-def> <cel-str>kb-gxx-option-O3-is-compatible</cel-str> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-block> <cel-stack-push> <cel-str>kb-option-mainoptimization</cel-str> </cel-stack-push> <cel-stack-push> <cel-str>-O3</cel-str> </cel-stack-push> <cel-var-set> <cel-str>result</cel-str> <cel-function-call> <cel-str>kb-common-option-apply</cel-str> </cel-function-call> </cel-var-set> </cel-block> </cel-cond-if> <cel-var-get> <cel-str>result</cel-str> </cel-var-get> </cel-function-def> </cel> --- NEW FILE: cse.xml --- <?xml version="1.0" ?> <!-- CSE (common subexpression elimination) related options for gxx --> <!-- included by gxx/options.xml --> <cel> <!-- cse-follow-jumps --> <cel-function-def> <cel-str>kb-gxx-option-cse-follow-jumps-is-compatible</cel-str> <cel-var-set> <cel-str>return</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-cond-if> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O2</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O3</cel-str> </cel-cmp-eq> </cel-logic-or> <cel-var-set> <cel-str>return</cel-str> <cel-str>option implied by -O2 and -O3</cel-str> </cel-var-set> </cel-cond-if> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> <!-- cse-skip-blocks --> <cel-function-def> <cel-str>kb-gxx-option-cse-skip-blocks-is-compatible</cel-str> <cel-var-set> <cel-str>return</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-cond-if> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O2</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O3</cel-str> </cel-cmp-eq> </cel-logic-or> <cel-var-set> <cel-str>return</cel-str> <cel-str>option implied by -O2 and -O3</cel-str> </cel-var-set> </cel-cond-if> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> </cel> |