Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Fortran 90 Compiler for HP-UX: Fortran 90 Programmer's Guide > Chapter 1 An overview of HP Fortran 90

Back-end

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

The two main functions of the back-end are:

  • To optimize your program for faster performance

  • To generate the code that goes into the object file

Optimization is performed by two subcomponents of the compiler's back end:

  • The High-Level Optimizer (HLO), which performs large-scale, high-semantic-level analyses and transformations to increase performance.

  • The low-level optimizer, which performs traditional optimizations (such as common subexpression elimination and dead-code removal) as well as machine-specific optimizations.

Options for controlling optimization form the largest group of the compile-line options. These options enable you to do the following:

  • To set the level of optimization that is applied to your program

  • To apply a package of optimizations that meet certain requirements of your application—for example, optimizations that favor compile-time speed over performance

  • To apply specific optimization technologies to your program, or to specific parts of your program, for fine-tuning performance

Table 1-4 “Options for controlling optimization” lists (in summary form) the options that control optimization. For information about how to use these options, see “Using options to control optimization”. The optimization technology of HP compilers is the subject of a white paper: see the HP PA-RISC Compiler Optimization Technology White Paper.

NOTE: If you use the f90 command to compile and link on separate command lines, many of the optimization options must appear on both the compile line and the link line; see Chapter 6 “Performance and optimization”. For information about using f90 to compile and link, see “Linking with f90 vs. ld”.

Table 1-4 Options for controlling optimization

OptionFunction
+DC7200

Perform memory hierarchy optimizations for the PA7200 processor.

-O[optlevel]

Optimize program, where optlevel is 0 (no optimization), 1, 2, or 3 (the highest level). If optlevel is not specified, the program is optimized at level 2 (-O2).

+Ooptlevel

This option has the same meaning as the -O[optlevel] option, except that optlevel must be specified. It is provided for compatibility with makefiles.

+O[no]info

Provide [do not provide] feedback information about the optimization process. This option is most useful at optimization level 3 and higher. The default is +Onoinfo.

+O[no]optimization

Enable [disable] optimization, a predefined string that indicates a category of optimizations (for example, those that do not increase code size) or a specific optimization technology (for example, inlining). See the HP Fortran 90 Programmer's Reference, for the different values for optimization.

 

The other component of the back end is the code generator (CodeGen), which you can control by using the compile-line options in Table 1-5 “Options for controlling code generation”. These options allow you to specify (among other things) that the output file include debugging or profiling information or that local variables be saved in static memory.

Table 1-5 Options for controlling code generation

OptionFunction
+[no]asm

Compile the named source files and leave [do not leave] the assembly language output in corresponding files whose names are suffixed with .s. The default is +noasm.

+DAmodel

Generate code for a specific version of the PA-RISC architecture. model can be one of the following:

  • PA-RISC version number (1.1 or 2.0)

  • A model number (for example, 750 or 870).

  • One of the PA-RISC processor names (for example, PA7000, PA7100, or PA8000).

  • The word portable to generate code compatible across all PA-RISC 1.1 and 2.0 workstations and servers.

For information about using this option, see “Compiling for different PA-RISC machines”.

+DSmodel

Perform instruction scheduling appropriate for a specific implementation of the PA-RISC architecture. model can be one of the following:

  • PA-RISC version number (1.1 or 2.0)

  • A model number (for example, 750 or 870).

  • One of the PA-RISC processor names (for example, PA7000, PA7100, or PA8000).

For information about using this option, see “Compiling for different PA-RISC machines”.

-g

Generate debugging information needed by the debugger. This option is compatible with optimization levels 0, 1, and 2. If you compile and link separately and specify -g on the compile line, you must also specify it on the link line.

For information about using this option to prepare programs for the debugger, see “Using the HP DDE debugger”.

+[no]gprof

Prepare [do not prepare] object files for profiling with gprof; see the gprof(1) man page. The default is +nogprof. If you compile and link separately and specify +gprof on the compile line, you must also specify it on the link line.

For information about using this option to profile programs with gprof, see “gprof”.

+k

Generate code for programs that reference a very large number of shared data items. The linker will issue a diagnostic message in the rare cases when this option is needed.

+pic={short|long|no}

Generate Position Independent Code (PIC) with short displacements (+pic=short) or long displacements (+pic=long) for use in shared libraries. The default is +pic=no.

For information about using this option when creating shared libraries, see “Compiling with +pic”.

+[no]prof

Prepare [do not prepare] object files for profiling with prof; see the prof(1) man page. The default is +noprof. If you compile and link separately and specify +prof on the compile line, you must also specify it on the link line.

For information about using this option to profile programs with prof, see “prof”.

+[no]save

Save [do not save] all local variables in all subprograms.

For information about using this option when porting, see “Uninitialized variables”.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.