Siemens Nixdorf RM series compiler flags for C-DS 1.2A (as of June 1996) ======================================================================== The following is a list of short explanations of compiler/linker flags used for SPEC CPU result submissions for Siemens Nixdorf RM systems. It covers SPEC benchmark result publications for RM systems (series RM600, RM400, RM300, RM200), published in 1996, with the following compiler versions: C: C-DS V1.2A It is likely that future result submissions, if they use new compiler versions, will have different flags; then this flag description will be superseded by a new one. For results obtained with earlier compilers (C-DS 1.1A, F77 1.4A), see the earlier flag description: http://www.specbench.org/osg/cpu95/flags/Siemens-960504.txt Note that not all flags have been used in all measurements; some are used for specific benchmark suites only (e.g. CINT95, CINT92), some are used for specific languages only (C, Fortran). The order of flags is significant; a later flag may overrule an earlier flag. 1. Specific optimization flags: ------------------------------- -FI Inlining for certain C or Fortran library functions whose names are listed in the compiler documentation. (For C: abs, fabs, alloca, sqrt, memset, memcpy). -KOlimit:2000 Limit for the number of basic blocks in a subroutine that will be optimized by the global optimizer (Default: 1000). Compilation time is traded for higher execution speed. -Kold No global data with 16-bit address offset are addressed via the gp register. Object modules can therefore be linked (statically) with PIC (position-independent code) objects. -WM,-Gnum Make global data with a length up to "num" addressable with a 16 bit offset via the "gp" register (default: num = 0). If the parameter "num" is chosen in a way that more than 64 KByte of global data would need to be addressable in this way, the linker generates a message and does not produce a linked binary. In this case, a smaller number has to be chosen. -Wc,-afep,n Entry points of functions are aligned to 2**n bytes. "afep" means "Alignment function entry points". Code size is traded for higher execution speed (better usage of caches). Default: 2**2 = 4 bytes. -Wo,-loopunroll:n Unroll loops n times (default: 4). -Wo,-unrolllimit:n Limit for the number of statements in a loop that is to be unrolled. -Krostr Place strings (arrays of "char", initialized with some string) in read-only memory. It is common programming practice to use such strings as read-only constants. However, there are legal C programs where the array contents can be changed. Therefore, this flag is an "assertion flag" in the sense of SPEC's baseline rules. -Kroconst Place constants that are declared with the (ANSI C) keyword "const" in read-only memory. Since ANSI C requires that such constants are not overwritten, this is not an assertion flag. -qfeedback Causes the compiler to produce an executible that generates profiling information for feedback optimization. All other optimization options are ignored when used with this option. If used in connection with the SPEC CPU95 tools, the "train" input files are used automatically for the feedback information collecting run. -Wb,-mips3 Generate code for the R4000 CPU -Wb,-mips2 Generate code for the R3000 CPU -Wb,-r4000 Optimize for the R4000 pipeline -dn Static linking (no dynamic linking) -WM,-no_inlining Disable all function inlining, including default inlining. 2. General optimization flags: ------------------------------- -O The optimizer (uopt) performs optimizations within the bounds of individual functions. -WM,-Ox The uld phase combines all the Ucode files and symbol tables, and passes control to umerge. The umerge phase reorders the Ucode for optimal processing by uopt. The uopt phase performs global optimizations. -WM,-O2 umerge does function inlining, then passes control to uopt for global optimization. -WM,-O3 umerge does function inlining and interprocedural register allocation, then passes control to uopt for global optimization. -WM,-O4 This option performs the same functions as the -WM,-O2 option, plus feedback optimization. The uprof phase takes profiling input from a profiling summary file and annotates the Ucode with this information to help the other phases to make better optimization decisions. (inlining, better global optimization, procedure positioning, branch elimination, procedure splitting) -WM,-O5 This option performs the same functions as the -WM,-O3 option, plus feedback optimization. Additionally to the -WM,-O4 option, the umerge phase performs function inlining and interprocedural register allocation. -FX General optimization flags / convenience option, includes "-WM,-O3" plus the following: -KOlimit 2000 -FI -Wb,-mips2 -Wb,-r4000 -Kold -Wo,-loopunroll:2 -Wo,-unrolllimit:100 -dn -WM,-G8 This flag is recommended for high performance if compilation time, executability on an R3000 and compatibility with code compiled in other environments (older interlanguage calling sequence) are not an issue. It does not imply any "assertions" in the sense of SPEC's baseline rules. 3. Questions? ------------- More details about these and other flags can be found in the appropriate documentation (manuals, release notes). Additional SPEC-specific questions can be directed to the Siemens Nixdorf SPEC representative Reinhold Weicker Siemens Nixdorf OEC HES PM4 33094 Paderborn Germany E-Mail: weicker.pad@sni.de