United States |
|
|
||
For OpenVMS VAX systems the default, /OPTIMIZE, is equivalent to /OPTIMIZE=(DISJOINT,INLINE). For OpenVMS Alpha systems the default, /OPTIMIZE, is equivalent to /OPTIMIZE=(INLINE=AUTOMATIC,LEVEL=4,UNROLL=0,TUNE=GENERIC). Use /NOOPTIMIZE or /OPTIMIZE=LEVEL=0 (ALPHA ONLY) for a debugging session to ensure that the debugger has sufficient information to locate errors in the source program. In most cases, using /OPTIMIZE will make the program execute faster. As a side effect of getting the fastest execution speeds, using /OPTIMIZE can produce larger object modules and longer compile times than /NOOPTIMIZE. At optimization level 3 or above, Compaq C attempts to unroll certain loops to minimize the number of branches and group more instructions together to allow efficient overlapped instruction execution (instruction pipelining). The best candidates for loop unrolling are innermost loops with limited control flow. As more loops are unrolled, the average size of basic blocks increases. Loop unrolling generates multiple loop code iterations in a manner that allows efficient instruction pipelining. The loop body is replicated a certain number of times, substituting index expressions. An initialization loop may be created to align the first reference with the main series of loops. A remainder loop may be created for leftover work. The number of times a loop is unrolled can be determined by the optimizer or the user can specify the limit for loop unrolling using the /OPTIMIZE=UNROLL qualifier. Unless the user specifies a value, the optimizer unrolls a loop 4 times for most loops or 2 times for certain loops (large estimated code size or branches out the loop).
Software Pipelining (ALPHA ONLY)
Software pipelining and additional software dependence analysis are enabled by using /OPTIMIZE=LEVEL=5, which in certain cases improves run-time performance. Loop unrolling (enabled at /OPTIMIZE=LEVEL=3 or higher) is constrained in that it cannot schedule across iterations of a loop. Because software pipelining can schedule across loop iterations, it can perform more efficient scheduling that eliminates instruction stalls within loops, by rearranging instructions between different unrolled loop iterations to improve performance. For example, if software dependence analysis of data flow reveals that certain calculations can be done before or after that iteration of the unrolled loop, software pipelining reschedules those instructions ahead of or behind that loop iteration, at places where their execution can prevent instruction stalls or otherwise improve performance. Loops chosen for software pipelining:
By modifying the unrolled loop and inserting instructions as needed before and/or after the unrolled loop, software pipelining generally improves run-time performance, except for cases where the loops contain a large number of instructions with many existing overlapped operations. In this case, software pipelining may not have enough registers available to effectively improve execution performance, and run-time performance using level 5 may not improve as compared to using level 4. To determine whether using level 5 benefits your particular program, time program execution for the same program compiled at levels 4 and 5. For programs that contain loops that exhaust available registers, longer execution times may result with level 5. In cases where performance does not improve, consider compiling using /OPTIMIZE=(UNROLL=1, LEVEL=5) to possibly improve the effects of software pipelining. /PDSC_MASK=option (ALPHA ONLY)Forces the compiler to set the PDSC$V_EXCEPTION_MODE field of the procedure descriptor for each function in the compilation unit to the specified value, regardless of the setting of any other qualifiers.Ordinarily the PDSC$V_EXCEPTION_MODE field gets set automatically by the compiler, depending on the /IEEE_MODE qualifier setting. The /PDSC_MASK qualifier overrides the /IEEE_MODE qualifier setting of this field.
As shown in Table 1-17, the qualifier option keywords are exactly the allowed values defined in the OpenVMS Calling Standard for this field, stripped of the PDSC$V_EXCEPTION_MODE prefix (for example, /PDSC_MASK=SIGNAL sets the field to PDSC$V_EXCEPTION_MODE_SIGNAL).
In the absence of the /PDSC_MASK qualifier, the compiler sets the PDSC$V_EXCEPTION_MODE field automatically, depending on the /IEEE_MODE qualifier setting:
/[NO]PLUS_LIST_OPTIMIZE (ALPHA ONLY)Provides improved optimization and code generation across file boundaries that would not be available if the files were compiled separately.When you specify /PLUS_LIST_OPTIMIZE on the command line in conjunction with a series of file specifications separated by plus signs, the compiler does not concatenate each of the specified source files together; such concatenation is generally not correct for C code because a C source file defines a scope. Instead, each file is treated separately for purposes of parsing, except that the compiler issues diagnostics about conflicting external declarations and function definitions that occur in different files. For purposes of code generation, the compiler treats the files as one application and can perform optimizations across the source files. The default is /NOPLUS_LIST_OPTIMIZE. /[NO]POINTER_SIZE=option (ALPHA ONLY)Controls whether or not pointer-size features are enabled and whether pointers are 32-bits or 64 bits.The default is /NOPOINTER_SIZE, which disables pointer-size features, such as the ability to use #pragma pointer_size , and directs the compiler to assume that all pointers are 32-bit pointers. This default represents no change over previous versions of Compaq C. Table 1-18 shows the /POINTER_SIZE qualifier options.
Specifying /POINTER_SIZE=32 enables pointer-size features and directs the compiler to assume that all pointers are 32-bit pointers. Specifying /POINTER_SIZE=64 enables pointer-size features and directs the compiler to assume that all pointers are 64-bit pointers. Specifying /POINTER_SIZE enables the following pointer-size features:
For information about other compiler features that affect pointer size or warn about potential pointer size conflicts, see the following:
The /POINTER_SIZE qualifier must be specified for any program that uses 64-bit pointers. /PRECISION[=option]Controls whether floating-point operations on float variables are performed in single or double precision. Table 1-19 shows the /PRECISION qualifier options.
Your code may execute faster if it contains float variables and is compiled with /PRECISION=SINGLE. However, the results of your floating-point operations will be less precise. See the Compaq C Language Reference Manual for more information on floating-point variables. The default is /PRECISION=DOUBLE for /STANDARD=VAXC and /STANDARD=COMMON compiler modes. The default is /PRECISION=SINGLE for /STANDARD=ANSI89 and /STANDARD=RELAXED_ANSI89 compiler modes. /[NO]PREFIX_LIBRARY_ENTRIES[=(option[,...])]The Compaq C Run-Time Library (RTL) shareable image, DECC$SHR.EXE, resides in SYS$LIBRARY with a DECC$ prefix for its entry points. The linker searches IMAGELIB.OLB to locate the shareable image. Every external name in IMAGELIB.OLB has a DECC$ prefix, and, therefore, has an OpenVMS conformant name space (a requirement for inclusion in IMAGELIB).The /[NO]PREFIX_LIBRARY_ENTRIES qualifier lets you control the Compaq C RTL name prefixing. Table 1-20 describes the /PREFIX_LIBRARY_ENTRIES qualifier options.
If you want no names prefixed, specify /NOPREFIX_LIBRARY_ENTRIES. For /STANDARD=ANSI89, the default is /PREFIX=ANSI_C89_ENTRIES. For /STANDARD=C99 the default is /PREFIX=C99_ENTRIES. (ALPHA ONLY) For all other compiler modes, the default is /PREFIX=ALL. /[NO]PREPROCESS_ONLY[=filename]Gives the same functionality as the -E qualifier on UNIX C compilers. When specified, it performs only the actions of the preprocessor phase and writes the resulting processed text to a file. No semantic or syntax processing is done. Furthermore, no object file, diagnostic file, listing file, or analysis data file is produced.If you do not specify a file name for the preprocessor output, the name of the output file defaults to the file name of the input file with a .I file type. The default is /NOPREPROCESS_ONLY. /[NO]PROTOTYPE[=(option[,...])]Creates an output file containing function prototypes for all global functions defined in the module being compiled.ANSI-style prototypes are created even for functions defined with Kernighan and Ritchie style syntax. This qualifier can be used to convert to ANSI-sytle prototypes or just to ensure that every function definition has a compatible explicit declaration, thereby avoiding implicit declarations that can sometimes produce surprising results. Table 1-21 describes the /PROTOTYPE qualifier options.
The default is /NOPROTOTYPES. /PSECT_MODEL=[NO]MULTILANGUAGE (ALPHA ONLY)Controls whether the compiler allocates the size of overlaid psects to ensure compatibility when the psect is shared by code created by other Compaq compilers.The problem this switch solves can occur when a psect generated by a FORTRAN COMMON block is overlaid with a psect consisting of a C struct. Because FORTRAN COMMON blocks are not padded, if the C struct is padded, the inconsistent psect sizes can cause linker error messages. Compiling with /PSECT_MODEL=MULTILANGUAGE ensures that Compaq C uses a consistent psect size allocation scheme. The corresponding FORTRAN switch is /ALIGN=COMMON=[NO]MULTILANGUAGE. The default is /PSECT=NOMULTILANGUAGE, which is the old default behavior of the compiler, and is sufficient for most applications. /REENTRANCY=option (ALPHA ONLY)Controls the type of reentrancy that reentrant Compaq C RTL routines will exhibit. (See the decc$set_reentrancy RTL routine.)This qualifier is for use only with a module containing the main routine. The reentrancy level is set at run time according to the /REENTRANCY qualifier specified while compiling the module containing the main routine. Table 1-22 describes the /REENTRANCY qualifier options.
The default is /REENTRANCY=TOLERANT. /REPOSITORY=optionSpecifies a repository for the compiler to store shortened external name information. When /NAMES=SHORTENED is specified, the compiler stores to the repository any external names that were shortened. The demangler utility can then be used to map the shortened names back to the names used in the original C program.By default, the qualifier is not active unless /NAMES=SHORTENED has been specified, in which case the default is /REPOSITORY=[.CXX_REPOSITORY]. The default name of the repository is the same as that used by the Compaq C++ compiler for decoding mangled names. This is intentional. A C++ mangled name cannot match a shortened name, so a single repository can be used by both the Compaq C and Compaq C++ compilers. /ROUNDING_MODE=option (ALPHA ONLY)If /FLOAT=IEEE_MODE is specified, the /ROUNDING_MODE qualifier lets you select one of the following IEEE rounding modes:
If /FLOAT=G_FLOAT or /FLOAT=D_FLOAT is specified, then rounding defaults to /ROUNDING_MODE=NEAREST, with no other choice of rounding mode. /[NO]SHARE_GLOBALSControls whether the compiler will treat declarations of objects with the globaldef keyword as shared or not shared.Also, in conjunction with the /EXTERN_MODEL qualifier, controls whether the initial extern_model is shared or not shared (for those extern_model s where it is allowed). The initial extern_model of the compiler is a fictitious pragma constructed from the settings of the /EXTERN_MODEL and /SHARE_GLOBALS qualifiers. The default value is /NOSHARE_GLOBALS. This default value is different from VAX C, which treats external objects as shared by default. As a result, you may experience the following impact:
/SHOW[=(option[,...])]Sets or cancels listing options. You must use the /LIST qualifier with the /SHOW qualifier to use any of the /SHOW options. Table 1-23 describes the /SHOW qualifier options.
/[NO]STANDARD[=(option[,...])]Defines the compilation mode. Table 1-24 describes the /STANDARD qualifier options.
| |
privacy statement and legal notices |