Previous | Contents | Index |
Use the -show code or -machine_code , -show include , and -show map options to control the amount of information in a listing file. To use any of the following options, specify the -V option to request a listing file:
-show code or -machine_code
Specifying -show code or -machine_code includes a machine-language representation of the compiled code if a listing file is being generated. This machine language cannot be assembled.-show hpf
(TU*X ONLY) When used with the -wsf or -wsf num option, specifying -show hpf shows information about HPF parallelization. For more information, see Section 3.92.5.-show include
Specifying -show include lists the contents of any included file if a listing is being generated.-show map
Specifying -show map includes a symbol map in the listing file.
If you omit these options, the listing file contains the minimum amount of information.
Specifying
-source_listing
tells the compiler to create a listing file of the source program. The
file also contains compiler-generated information such as that
specified by the
-V
option. The name of the listing file is the base name of the source
file with a
.lis
suffix. The default value is
-nosource_listing
.
3.74 -speculate keyword --- Speculative Execution Optimization
Specifying the -speculate all option (TU*X ONLY) or the -speculate by_routine option (TU*X ONLY) requests the speculative execution optimization.
Speculative execution reduces instruction latency stalls to improve run-time performance for certain programs or routines. Speculative execution evaluates conditional code (including exceptions) and moves instructions that would otherwise be executed conditionally to a position before the test, so they are executed unconditionally.
Speculative execution affects code most noticeably at -O3 and higher.
Performance improvements may be reduced because the run-time system must dismiss exceptions caused by speculative instructions. For certain programs, longer execution times may result when using the speculative execution optimization. To determine whether using -speculate all or -speculate by_routine benefits your particular program, you should time program execution for the same program compiled with -speculate by_routine or -speculate all with -speculate none (default).
Speculative execution does not support some run-time error checking, since exception and signal processing (including SIGSEGV, SIGBUS, and SIGFPE) is conditional. When the program needs debugging or while testing for errors, only use -speculate none .
The default, -speculate none or -nospeculate , means that the speculative execution code scheduling optimization is not used and exceptions are reported as expected.
-speculate all
Perform speculative execution optimization on all routines in the program. All exceptions within the entire program are dismissed without calling any user-mode signal handler or reporting exceptions.If a compilation unit is compiled with -speculate all , then it may not be linked with any other object or library that does its own exception processing. Do not use -speculate all if your program does any of the following:
- Generates any exceptional values other than underflow values
- Uses a user-supplied signal handler
- Was compiled with any of the -check keyword options
-speculate by_routine
Indicates that all routines in the current compilation unit (set of routines being compiled) can do speculative execution, but speculative execution will not be performed for routines in other compilation units in the program.All exceptions within the routines being compiled with -speculate by_routine are quietly dismissed without calling any user-mode signal handler, but the object files created can be linked with other objects or libraries that perform exception processing. For example, using -speculate by_routine allows the Compaq Fortran Run-Time Library to report exceptions.
-speculate none
Disables all speculative code scheduling. This is the default.The -speculate none option is equivalent to -nospeculate ; using either option disables speculative execution optimization.
Use the -std , -std90 , and -std95 options to request that the compiler issue informational messages for syntax that can be identified at compile-time as being not standard in the Fortran 90 or Fortran 95 language. The default is -nostd .
-std, -std90
The -std and -std90 options request that the compiler issue messages for:
- Syntax extensions to the Fortran 95/90 standards. Syntax extensions include nonstandard statements and language constructs.
- Fortran 95/90 standard-conforming statements that become nonstandard due to the way in which they are used. Data type information and statement locations are considered when determining semantic extensions.
- For fixed-format source files, lines that use tab formatting.
-std95
The -std95 option checks for extensions to the Fortran 95 standard. That includes all the checks performed by the -std90 option with the following exceptions:
- The FORALL statement is part of Fortran 95; thus it is not flagged as an extension by the -std95 option
- User-defined PURE functions are part of Fortran 95; thus they are also not flagged as extensions.
- The following features that were obsolescent in F90 are deleted in Fortran 95 ( -std95 flags them as deleted) but the Compaq Fortran compiler fully supports them:
- REAL and DOUBLE PRECISION DO variables
- Branching to an ENDIF statement from outside the paired IF statement
- PAUSE statement
- ASSIGN statement, assigned GOTO, and assigned FORMAT statements
- H edit descriptor
On Tru64 UNIX systems, the Compaq Fortran compiler recognizes the following equivalencies:
f95 -std is the same as f90 -std95
f90 -std is the same as f90 -std90
On Linux systems, the Compaq Fortran compiler recognizes the following equivalency:
fort -std is the same as fort -std95
Source statements that do not conform to Fortran 90 or Fortran 95 language standards are detected by the Compaq Fortran compiler under the following circumstances:
Given these circumstances, the compiler is able to detect most instances of nonconforming usage. It does not detect all instances because the -std options do not produce checks for all nonconforming usage at compile time. In general, the unchecked cases of nonconforming usage arise from the following situations:
Most of the unchecked cases occur in the interface between calling and called subprograms. However, other cases are not checked, even within a single subprogram.
The following items are known to be unchecked:
On Tru64 UNIX systems only, the -std options interact with the -wsf option (requests generation of parallel HPF code) as follows:
You should not specify both -std and -wsf .
On the Compaq Fortran language, see the Compaq Fortran Language Reference Manual.
3.76 -synchronous_exceptions --- Report Exceptions More Precisely
Specifying the -synchronous_exceptions option associates an exception with the instruction that causes it, resulting in precise exception reporting. Specifying -synchronous_exceptions slows program execution, so only specify it when debugging a specific problem, such as locating the source of an exception.
If you omit the
-synchronous_exceptions
option and
-fpe0
is in effect, exceptions can be reported one or more instructions
after the instruction that caused the exception. If you specify
-fpe1
,
-fpe2
,
-fpe3
, or
-fpe4
, exceptions are reported precisely (same as specifying
-synchronous_exceptions
).
3.77 -syntax_only --- Do Not Create Object File
Specifying the -syntax_only option allows you to do a quick syntax check of your source file without creating an object file. Some error checking is bypassed (for example, checking for uninitialized variables, -warn nouninitialized ), and no code is generated.
The default is
-nosyntax_only
, which tells the compiler to try to produce an object file.
3.78 -threads --- Link Using Threaded Run-Time Library
Use the
-threads
(TU*X ONLY) option to request that the
linker use threaded libraries. This is usually used with the
-reentrancy threaded
option (see Section 3.71). The
-pthread
option is a synonym for
-threads
.
3.79 -transform_loops --- Activate Loop Transformation Optimizations
Specifying -transform_loops (or -O5 ) activates a group of loop transformation optimizations that apply to array references within loops. These optimizations can improve the performance of the memory system and usually apply to multiple nested loops. The loops chosen for loop transformation optimizations are always counted loops (which include DO or IF loops, but not uncounted DO WHILE loops).
Conditions that typically prevent the loop transformation optimizations from occurring include subprogram references that are not inlined (such as an external function call), complicated exit conditions, and uncounted loops.
The types of optimizations associated with -transform_loops include the following:
The loop transformation optimizations are a subset of optimizations activated by -O5 . Instead of specifying both -pipeline and -transform_loops , you can specify -O5 .
To specify loop transformation optimizations without software pipelining, do one of the following:
To determine whether using -transform_loops benefits your particular program, you should time program execution for the same program (or subprogram) compiled with and without loop transformation optimizations (such as with -transform_loops and -notransform_loops ).
Use the -tune keyword option to specify the types of processor-specific instruction tuning for implementations of the Alpha architecture.
Regardless of the setting of -tune keyword option you use, the generated code runs correctly on all implementations of the Alpha architecture. Tuning for a specific implementation can improve run-time performance; it is also possible that code tuned for a specific Alpha processor may run slower on another Alpha processor.
If you omit -tune keyword , -tune generic is used.
-tune generic
Generates and schedules code that will execute well for all implementations of the Alpha architecture. This provides generally efficient code for those cases where different processor generations are likely to be used. This is the default.-tune host
Generates and schedules code optimized for the implementation of the Alpha architecture in use on the system being used for compilation.-tune ev4
Generates and schedules code optimized for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture.-tune ev5
Generates and schedules code optimized for the 21164 implementation of the Alpha chip. This implementation of the Alpha architecture is faster and more recent than the implementations of the Alpha architecture associated with -tune ev4 (21064, 21064A, 21066, and 21068).-tune ev56
Generates and schedules code optimized for some 21164 Alpha architecture implementations that use the byte and word manipulation instruction extensions of the Alpha architecture.-tune pca56
Generates and schedules code optimized for the 21164PC Alpha architecture implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions.-tune ev6
Generates and schedules code optimized for the 21264 Alpha architecture implementations that use the byte and word manipulation instruction extensions, multimedia instruction extensions, and square root and floating-point convert extensions.-tune ev67
Generates and schedules code optimized for the 21264A Alpha architecture implementations that use the byte and word manipulation instruction extensions, multimedia instruction extensions, square root and floating-point convert extensions, and count extensions.
On improving and measuring run-time performance, see Chapter 5.
3.81 -U --- Activates Case Sensitivity
This option causes Compaq Fortran to distinguish between uppercase and
lowercase letters in identifiers and external names. It has the same
effect as the
-names as_is
option.
3.82 -Uname --- Undefine Preprocessor Symbol Name
Specifying
-Uname
removes the definition of name, such as a predefined symbol.
Predefined preprocessor symbols are defined in Section 3.26.
3.83 -unroll num --- Specify Number for Loop Unroll Optimization
Use -unroll num to specify the number of times (a number num) a loop can be unrolled. Specify this option only with -O3 or higher optimization levels, at which loop unrolling occurs.
If you omit -unroll num or specify -unroll 0 , the optimizer determines how many times loops are unrolled. Usually loops are unrolled four times, but code analysis may result in certain loops being unrolled twice (two times). The option -nounroll is not allowed.
Specify the num value as an integer between 0 and 16. If count is between 1 and 16, it specifies the number of times loops are unrolled, instead of letting the optimizer determine how many times loops are unrolled.
Specifying the -V option creates a listing of the Compaq Fortran source file with various compile-time information appended. The source listing is written to a listing file with the .l file suffix. When a diagnostic message is displayed, the listing file contains an error message with a column pointer (such as .....1) that points to the specific part of the source line that caused the error.
A file name whose suffix is .l may conflict with lex . If you want to have the listing file end instead with .lis , then use the option -source_listing .
If you expect your program to get compilation errors, request a separate listing file ( -V option) or use the error command to insert the error messages into the appropriate place in your source program.
Using a listing file provides slightly more information and includes the column pointer (1) that indicates the exact part of the line that caused the error. Especially for large files, consider obtaining a printed copy of the listing file you can reference while editing the source file.
If you request a listing file by specifying the -V option without other options (such as -show code ), the listing file will not show the code of included source files or machine code and will not include a cross-reference table.
If a source line of length 1 contains a form-feed character, the source code listing begins a new page with the following line; the line containing the form-feed does not appear.
If a source line of length greater than 1 contains a form-feed character, that line is printed but the form-feed character is ignored (does not generate a new page).
Any other nonprinting ASCII characters encountered in Compaq Fortran source files are replaced by a space character, and a warning message appears.
The name of the listing file is the same as for the source file, with the .l substituted for the .f90 , .f , .for , .FOR , .F , or .F90 .
If you specify multiple source files without the -c option, a single listing file is created.
If you specify multiple source files with the -c option (and -V option), multiple listing files are created.
The default value of this option is -noV .
Specifying the -v option displays the preprocessor (if requested), compiler, and linker passes as they execute, including final resource usage in the C shell time command format. The Compaq Fortran compiler is decfort90 , the C compiler is cc on Tru64 UNIX systems but ccc on Linux systems, the linker is ld , and so forth.
The default is
-nov
, which does not display any command processing information.
3.86 -version --- Show Compaq Fortran Version Information
Specifying the
-version
option displays the version information of the Compaq Fortran product
in use. You can use this option alone on the
f90
command line.
3.87 -vms --- OpenVMS Fortran Compatibility
Specifying the -vms option controls VMS-related run-time defaults, including alignment, deleted records in relative files, OPEN statement BLANK specifier, ENDFILE records, reading deleted records and ENDFILE, and implicit and explicit OPEN. It causes the run-time system to provide functions like VAX FORTRAN (on OpenVMS operating systems) in the following ways:
Previous | Next | Contents | Index |