1.2. VisualAge C++ for AIX Version 6.0

VisualAge C++ for AIX Version 6.0 offers a command-line compiler that supports the ISO/IEC 14882:1998 C++ International Standard. This latest version of the C++ compiler features a conforming C++ Standard Library, including the Standard Template Library (STL), enhanced optimization options that exploit the POWER4 architecture, OpenMP support, and more. It is supported on AIX Version 4.3.3 or later.

Note

The Standard Template Library is discussed in more detail in 10.6, “Standard C++ Library and STL” on page 388.


C++ programs written using Version 4 or 5 of IBM VisualAge C++ Professional for AIX are source compatible with VisualAge C++ for AIX Version 6.0. However, programs written using IBM C and C++ Compilers for AIX Version 3.6 and earlier are not source compatible, because the former compilers were based on the ISO C++ Draft. Also, the IBM Open Class® library has been removed and is no longer supported.

If installed, the compiler is installed under /usr/vacpp by default and uses the /etc/vacpp.cfg configuration file. To install to an alternate directory, or to retain the installation of a previous version of VisualAge C++ for AIX compiler, refer to 1.3.2, “Retaining a previous version of the compiler” on page 22.

The VisualAge C++ for AIX Version 6.0 compiler uses the LUM licensing system to control usage of the product. Refer to the following sections:

  • Section 1.4, “Activating the compilers” on page 23

  • Section 1.5, “Activating the LUM server” on page 26

  • Section 1.6, “Enrolling a product license” on page 27

1.2.1. New or improved optimization features

A number of optimization features have been introduced in VisualAge C++ for AIX Version 6.

Interprocedural Analysis

Interprocedural Analysis, or IPA, is now available in VisualAge C++ for AIX Version 6.0. IPA is an optimization performed on the entire application across function boundaries. See “Interprocedural analysis” on page 2 for more details.

New options and pragmas

In addition to the “New options and pragmas” on page 3 supported by C for AIX Version 6.0, VisualAge C++ for AIX Version 6.0 now supports the following options:

  • -qsmp (previously supported by C for AIX only)

  • -O4 and -O5 (previously supported by C for AIX only)

  • -qipa (previously supported by C for AIX only)

  • -qcache (previously supported by C for AIX only)

  • -qkeepinlines

  • -qtemplateregistry

  • -qtemplaterecompile

  • -qalign=bit_packed

  • -qoldpassbyvalue

  • -qlanglvl=ansiinit

  • #pragma unroll (previously supported by C for AIX only)

For a detailed description of these options, please refer to the VisualAge C++ for AIX Compiler Reference, SC09-4959.

1.2.2. OpenMP support

New in VisualAge C++ for AIX Version 6.0, the compiler now supports the OpenMP Version 1.0 specification for shared memory parallel programming. OpenMP is an Application Program Interface specification that provides a simple and flexible interface, including a number of pragma directives, data scope attributes, library functions, and environment variables, for parallel application development. Applications that conform to the OpenMP specification is easily portable to other platforms that support the specification.

OpenMP support is enabled in the compiler by the -qsmp option, which was previously available with the C for AIX compiler only. To ensure strict compliance to the OpenMP specification, use the -qsmp=omp option. Bear in mind that -qsmp=omp disables automatic parallelization performed by the compiler. See 1.2.3, “Automatic parallelization” on page 18. In either case, you must use one of the thread-safe compiler driver with the -qsmp option (see Table 1-4 on page 30).

For further information about OpenMP support, see Chapter 9, “Program parallelization using OpenMP” on page 335.

1.2.3. Automatic parallelization

In addition to strict OpenMP specification support, the -qsmp option enables automatic parallelization for program loops. Each parallel portion of the program is executed in its own thread, perhaps in its own processor of a multi-processor machine. To use the -qsmp option, you must use one of the thread-safe compiler drivers, as described in Table 1-4 on page 30.

1.2.4. Improved template handling

VisualAge C++ for AIX Version 6.0 introduces two new options, -qtemplateregistry and -qtemplaterecompile, which completely eliminate the need to structure your template code for reduced compilation time.

The -qtemplateregistry option works by storing template instantiation information in a registry as compilation occurs. The registry is read for each compilation, and a check is done when an instantiation is encountered. If the instantiation has already been seen, nothing will happen; otherwise, the template will be instantiated in the object file. In either case, a record is added to the registry to keep track of the information about use and instantiation for each compilation unit.

Should a change to a compilation unit remove a template instantiation, recompiling the compilation will result in undefined symbols at link time, since other files now may require the missing template instantiation. In this case, use the -qtemplaterecompile option to cause a recompilation of all source files that rely on the template.

The -qtemplateregistry and -qtemplaterecompile options are discussed in more detail in 10.5, “Template registry: The preferred method” on page 387.

1.2.5. C99 features

The following C99 features are available in VisualAge C++ for AIX Version 6.0 with the -qlanglvl=extended option:

1.2.6. GNU G++ compatibility

The VisualAge C++ for AIX Version 6.0 compiler supports the same set of GNU C extension features described in 1.1.3, “GNU C compatibility” on page 10.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset