Documentation errata for IBM XL C for AIX, V13.1

Preventive Service Planning


Abstract

This page contains corrections and additions to the product documentation shipped with IBM XL C for AIX, V13.1.

Content

The following corrections and additions apply to the IBM XL C for AIX, V13.1 Compiler Reference:

Topic location: Compiler options reference > Individual option descriptions > -O, -qoptimize

The following statement should be added under "Usage":

If optimization level -O3 or higher is specified on the command line, the -qhot and -qipa options that are set by the optimization level cannot be overridden by #pragma option_override(identifier, "opt(level, 0)") or #pragma option_override(identifier, "opt(level, 2)").


Topic location: Compiler options reference > Individual option descriptions > -qunroll

The following paragraph should be added to the end of the description for the n parameter:

If you specify a number for the -qunroll option, the compiler might limit unrolling to a number smaller than the value you specify. This is because the option form affects all loops in source files to which it applies and large unrolling factors might significantly increase compile time without necessarily improving runtime performance. To specify a specific unrolling factor for particular loops, use the #pragma form in those loops.


Topic location: Compiler pragmas reference > Individual pragma descriptions > #pragma option_override

Syntax

Should read:

Parameters

#pragma option_override value Equivalent compiler option
level, 0 -O
level, 2 -O2
level, 3 -O3
level, 4 -O4
level, 5 -O5
registerspillsize, size -qspill=size
size -qcompact
size, yes
size, no -qnocompact
strict, all -qstrict, -qstrict=all
strict, no, none -qnostrict
strict, suboption_list -qstrict=suboption_list

Should read:

#pragma option_override value Equivalent compiler option
level, 0 -O1
level, 2 -O21
level, 3 -O32
registerspillsize, size -qspill=size
size -qcompact
size, yes
size, no -qnocompact
strict  -qstrict, -qstrict=all
strict, yes
strict, no -qnostrict
strict, suboption_list -qstrict=suboption_list

Notes:

  1. If optimization level -O3 or higher is specified on the command line, #pragma option_override(identifier, "opt(level, 0)") or #pragma option_override(identifier, "opt(level, 2)") does not turn off the implication of the -qhot and -qipa options.
  2. Specifying -O3 implies -qhot=level=0. However, specifying #pragma option_override(identifier, "opt(level, 3)") in source code does not imply -qhot=level=0.

Topic location: Compiler pragmas reference > Individual pragma descriptions > #pragma ibm independent_loop

This section should be moved out of the "Pragma directives for parallel processing" section and be put under the "Individual pragma descriptions" section directly.

The following statement should be added:

This pragma only takes effect if you specify the -qsmp or -qhot compiler option.


Topic location: Compiler built-in functions > Synchronization and atomic built-in functions >Synchronization functions > __lwsync, __iospace_lwsync

Load Word Synchronize

Should read:

Lightweight Synchronize


Topic location: Compiler built-in functions > Vector built-in functions > vec_ctf

The following note is added under Purpose:

Note: The second and fourth elements of the result vector are undefined when the argument a is a signed long long or unsigned long long vector.


Topic location: Compiler built-in functions > Vector built-in functions

The following topics should be added under this section:

  • vec_xl
  • vec_xl_be
  • vec_xst
  • vec_xst_be

For details, see Adding support for vec_xl, vec_xl_be, vec_xst and vec_xst_be built-in functions in XL C, C/C++ for AIX, V13.1 and XL Fortran for AIX, V15.1.

The following corrections and additions apply to the IBM XL C for AIX, V13.1 Language Reference:

Topic location: Declarators > Pointers > Type-based aliasing

In the example:

Should read:

The compiler determines that the result of f += 1.0; is never used subsequently. Thus, the optimizer may discard the statement from the generated code.

Should read:

The compiler determines that the result of f += 1.0 does not affect the value of *p. Thus, the optimizer might move the assignment after the printf statement.


Topic location: Declarators > Initializers > Initialization of structures and unions

You do not have to initialize all members of a structure or union; the initial value of uninitialized structure members depends on the storage class associated with the structure or union variable. In a structure declared as static, any members that are not initialized are implicitly initialized to zero of the appropriate type; the members of a structure with automatic storage have no default initialization. The default initializer for a union with static storage is the default for the first component; a union with automatic storage has no default initialization.

The following definition shows a partially initialized structure:

 
struct address {
                 int street_no;
                 char *street_name;
                 char *city;
                 char *prov;
                 char *postal_code;
               };
struct address temp_address =
               { 44, "Knyvet Ave.", "Hamilton", "Ontario" };
 

The values of temp_address are:

Member Value
temp_address.street_no 44
temp_address.street_name address of string "Knyvet Ave."
temp_address.city address of string "Hamilton"
temp_address.prov address of string "Ontario"
temp_address.postal_code Depends on the storage class of the temp_address variable; if it is static, the value would be NULL.

Should read:

You do not have to initialize all members of structure variables. If a structure variable does not have an initializer, the initial values of the structure members depend on the storage class associated with the structure variable:

  • If a structure variable has static storage, its members are implicitly initialized to zero of the appropriate type.
  • If a structure variable has automatic storage, its members have no default initialization.

If a structure variable is partially initialized, all the uninitialized structure members are implicitly initialized to zero no matter what the storage class of the structure variable is. See the following example:

 
struct one {
    int a;
    int b;
    int c;
};
void main(){
    struct one z1;               // Members in z1 do not have default initial values.
    static struct one z2;        // z2.a=0, z2.b=0, and z2.c=0.
    struct one z3 = {1};         // z3.a=1, z3.b=0, and z3.c=0.
}

In this example, structure variable z1 has automatic storage, and it does not have an initializer, so all the members in z1 do not have default initial values. Structure variable z2 has static storage, and all its members are implicitly initialized to zero. Structure variable z3 is partially initialized, so all its uninitialized members are implicitly initialized to zero.

You do not have to initialize all members of a union. The default initializer for a union with static storage is the default for the first component. A union with automatic storage has no default initialization.

The following corrections and additions apply to the IBM XL C for AIX, V13.1 Optimization and Programming Guide:

Topic location: Optimizing your applications > Using profile-directed feedback

If the compiler cannot read any PDF files in this step, the compiler issues a severe error message and stops compilation.

Should read:

If the compiler cannot read any PDF files in this step, the compiler issues error message 1586-401 but continues the compilation. If you want the compiler to stop the compilation, specify option -qhaltonmsg=1586-401.


Topic location: Using the high performance libraries > Using the Mathematical Acceleration Subsystem libraries (MASS) > Compiling and linking a program with MASS

To compile an application that calls the functions in the scalar, SIMD, or vector MASS libraries, specify mass, and/or one of mass_simdp7, mass_simdp8, and/or one of massv, massvp3, massvp4, massvp5, massvp6, massvp7, massvp8 on the -l linker option.

Should read:

To compile an application that calls the functions in the scalar, SIMD, or vector MASS libraries, specify mass, and/or one of mass_simdp7, mass_simdp8, and/or one of massv, massvp4, massvp5, massvp6, massvp7, massvp8 on the -l linker option.

Rate this page:

(0 users)Average rating

Document information


More support for:

XL C for AIX
Documentation

Software version:

13.1

Operating system(s):

AIX

Reference #:

1673539

Modified date:

2014-09-30

Translate my page

Machine Translation

Content navigation