General Language Options
Descriptions of general language options.
-h [no]calchars
Default: -h nocalchars
The -h calchars option allows the use of the $ character in identifier names. This option is useful for porting code containing identifiers that include this character. With -h nocalchars, this character is not allowed in identifier names. Use this option with extreme care, because identifiers with this character are within CNL name space and are included in many library identifiers, internal compiler labels, objects, and functions. Prevent conflicts between identifiers within CNL name space and the code; any such conflict is an error.
-h restrict=args
The -h restrict=args option globally tells the compiler to treat certain classes of pointers as restricted pointers. Use this option to enhance optimizations, including vectorization.
| args | Description |
|---|---|
a | All pointers to object and incomplete types are considered restricted pointers, regardless of where they appear in the source code. This includes pointers in class, struct, and union declarations, type casts, function prototypes, and so on. Do not specify restrict=a if, during execution of any function, an object is modified and that object is referenced through either two different pointers or through the declared name of the object and a pointer. Undefined behavior may result. |
f | All function parameters that are pointers to objects or incomplete types can be treated as restricted pointers. Do not specify restrict=f if, during execution of any function, an object is modified and that object is referenced through either two different pointer function parameters or through the declared name of the object and a pointer function parameter. Undefined behavior may result. |
t | All parameters that are this pointers can be treated as restricted pointers (Cray C++ only). Do not specify restrict=t if, during execution of any function, an object is modified and that object is referenced through the declared name of the object and a this pointer. Undefined behavior may result. |
The args arguments tell the compiler to assume that, in the current compilation unit, each pointer (=a), each pointer that is a function parameter (=f), or each this pointer (=t) points to a unique object. This assumption eliminates those pointers as sources of potential aliasing, and may allow additional vectorization or other optimizations. These options cause only data dependencies from pointer aliasing to be ignored, rather than all data dependencies.
The arguments make assertions about the program that, if incorrect, can introduce undefined behavior. Do not use -h restrict=a if, during the execution of any function, an object is modified and that object is referenced through either of the following: Two different pointers The declared name of the object and a pointer The -h restrict=f and -h restrict=t options are subject to the analogous restriction, with "function parameter pointer" replacing "pointer."
-h [no]signedshifts
Default: -h nosignedshifts
For the expression e1 >> e2, where e1 has a signed type, when -h signedshifts is in effect, the vacated bits are filled with the sign bit of e1. When -h nosignedshifts is in effect, the vacated bits are filled with zeros, identical to the behavior when e1 has an unsigned type. Also, see Integers about the effects of this option when shifting integers.
-h list=list_opt
- a
- Use all list options.
- d
- Decompile (translate) the intermediate representation of the compiler into listings that resemble the format of the source code. This is performed twice, resulting in two output files, at different points during the optimization process. Use these files to examine the restructuring and optimization changes made by the compiler, which can lead to insights about changes made to the source code to improve its performance. The compiler produces two decompilation listing files with these extensions per specified source file: .opt and .cg. The compiler generates the .opt file after applying most high-level loop nest transformations to the code. The code structure of this listing most resembles the source code and is readable by most users. In some cases, because of optimizations, the structure of the loops and conditionals will be significantly different than the structure in the source file. The .cg file contains a much lower level of decompilation. It is quite close to what will be produced as assembly output. This version displays the intermediate text after all vector translation and other optimizations have been performed. An initmate knowledge of the hardware architecture of the system is helpful to understanding this listing. The .opt and .cg files are intended as a tool for performance analysis and are not vaild source code. The format and contents of the files can be expected to change from release to release.
- e
- Expand included files. This option is off by default.
- i
- Intersperse optimization messages within the loopmark listing rather than at the end.
- m
- Produce loopmark listing. To provide a more complete report, this option automatically enables the -0 negmsgs option to show why loops were not optimized. If this information is not required, use the -0 nonegmsgs option on the same command line. Loopmark information will not be displayed if the -d B option has been specified.
- o
- Show options used by the compiler at compile time in listing.
- s
- Create a complete source listing (include files not expanded).