XL C/C++ Advanced Edition is an optimizing, standards-based, command-line compiler for the Linux operating system running on PowerPC hardware with the PowerPC architecture. The compiler enables application developers to create and maintain optimized 32-bit and 64-bit applications. These applications can use automatic or explicit shared memory program parallelization to improve performance. Many of the optimizations and performance improvements made possible by the PowerPC architecture are controlled by compiler options, pragmas, and compiler invocation modes. The benefits of the hardware architecture can therefore be realized with a minimum amount of specialized hand coding.
This product is the follow-on release to IBM VisualAge C++ Version 6.0 for Linux. IBM has rebranded VisualAge C++ as XL C/C++.
Shared memory program parallelization
Significant gains in program performance lie in exploiting the shared memory program parallelization (SMP) that is possible on the PowerPC architecture. The compiler offers the following methods of implementing SMP:
OpenMP directives involve defining parallel regions of iterative and non-iterative code.
The compiler supports the two ISO programming language specifications for C: ISO/IEC 9899:1990 (referred to as C89) and ISO/IEC 9899:1999 (C99). The compiler also supports both of the C++ standards: ISO/IEC 14882:2003 (referred to as Standard C++) and ISO/IEC 14882:1998, the first official specification of the language (referred to as C++98). In addition to the standardized language levels, the compilers support numerous language extensions, which include a subset of the GNU C and C++ language extensions.
XL C/C++ supports the C++ Abstract Binary Interface (ABI). The compiler produces binary or object files that are compatible with those created with the GNU C/C++ Version 3.2 or 3.3 compiler. The compiler also supports the OpenMP version 2.0 standard. OpenMP-compliant C and C++ object files are binary compatible with those created by IBM XL Fortran for Linux, thus allowing interlanguage calls between C or C++ and Fortran.
Coexistence with open source resources
To achieve binary compatibility with code compiled with a GNU C or C++ compiler, a program compiled with XL C/C++ includes the same headers as those used by a GNU compiler residing on the same system. The compiler optimizes the program while maintaining binary compatibility with objects produced by GNU C. Some noteworthy points about this relationship are:
XL C/C++ provides a selection of base compiler invocation commands, which support various version levels of the C and C++ languages. Each invocation command automatically sets a compiler suboption for language level, options for other related language features, and any related predefined macros. In most cases, you should use the xlc command to compile C source files and the xlC command to compile C++ source files, or when you have both C and C++ source files. The invocation xlc++ is equivalent to xlC.
Variations of the base command are provided to support the requirements of special environments and file systems. A variation is formed by attaching a suffix to the base command. On the Linux platform, the _r suffix is provided for compiling thread-safe applications. These variations are also referred to as reentrant invocations.
In addition, the gxlc and gxlc++ utilities are specialized compiler invocations.
Related References
XL C/C++ uses the GNU C and C++ headers, and the resulting application is linked with the C and C++ run-time libraries provided with the gcc level that is loaded with the operating system.XL C/C++ ships the SMP run-time library to support the automatic parallelization and OpenMP features of the XL C/C++ compilers.
High-performance mathematics libraries
Starting in Version 7, XL C/C++ ships the IBM Mathematics Acceleration Subsystem (MASS) libraries of tuned mathematical intrinsic functions. MASS libraries are thread-safe and offer improved performance over the corresponding libm routines. Moreover, the MASS libraries can be used without requiring code changes. The compiler supports 32-bit and 64-bit versions of the MASS vector library, libmassvp4.a and libmassvp4_64.a, respectively, which contain vector routines for single-precision and double-precision reciprocal and square root functions.
XL C/C++ Advanced Edition provides the following specialized commands to aid program development. For more information, refer to XL C/C++ Compiler Reference.
XL C/C++ provides support for the Unicode standard, multibyte characters, UTF-16 and UTF-32 string literals, multiple loaded locales, and bidirectionality. These features make possible or facilitate the creation of international applications.
Related References
XL C/C++ Advanced Edition provides product documentation in the following formats:
These items are located or accessed as follows:
Readme files | The readme files are located in /opt/ibmcmp/vacpp/7.0 and in the root directory of the installation CD. |
Man pages | Man pages are provided for the compiler invocations and all command-line utilities provided with the product. |
HTML-based help system | A help system composed of HTML files is provided. The help system is also available online as part of the product Information Center. |
PDF documents | The PDF files are located in the /opt/ibmcmp/pdf directory. They are viewable and printable from the Adobe Acrobat Reader. If you do not have the Adobe Acrobat Reader installed, you can download it from http://www.adobe.com. |
The complete library of XL C/C++ PDF documents consists of the following files:
For the latest information about XL C/C++, visit the product documentation and support pages at the following URLs. In addition, IBM Redbooks, developed by the IBM Technical Support Organization, contain technical information based on realistic scenarios from practical experience.
You might find the following Redbooks useful for application development with XL C/C++:
_ POWER4 Processor Introduction and Tuning Guide, SG24-7041-00.
_ Understanding IBM eServer pSeries Performance and Sizing, SG24-4810-01.