Invoking IPA using the c89 or xlc utilities

You can invoke the IPA compile step, the IPA link step, or both using the c89 or xlc utilities. The step that you invoke depends upon the invocation parameters and type of files specified. To invoke IPA using c89, you must specify the I phase indicator along with the W option of the c89 utility. You can specify IPA suboptions as comma-separated keywords. To invoke IPA using xlc, you must use the -qipa, -O4, or -O5 options. You can specify IPA suboptions as colon-separated keywords.

If you invoke the c89 utility or xlc utility by specifying the -c compiler option and at least one source file, c89 or xlc automatically specifies IPA(NOLINK) and automatically invokes the IPA compile step. For example, the following c89 command invokes the IPA compile step for the source file hello.c:
c89 -c -WI,noobject hello.c
The following xlc command invokes the IPA compile step for the source file hello.c:
xlc -c -qipa=noobject hello.c

If you invoke c89 or xlc with at least one source file for compilation and any number of object files, and do not specify the -c option, c89 or xlc invokes the IPA compile step once for each compilation unit. It then invokes the IPA link step once for the entire program, and then invokes the binder.

Example: The following c89 command invokes the IPA compile step, the IPA link step, and the bind step while creating program foo:
c89 -o foo -WI,object foo.c
The following shows the same example using the xlc utility:
xlc -o foo -qipa=object foo.c

See c89 — Compiler invocation using host environment variables for more information about the c89 utility or xlc — Compiler invocation using a customizable configuration file for more information about the xlc utility.

Specifying options for the IPA compile step

You can pass options to the IPA compile step, as follows:
  • You can pass IPA compiler option suboptions by specifying -WI, for c89 or -qipa= for xlc, followed by the suboptions.
  • You can pass compiler options by specifying -Wc, for c89 or -q for xlc, followed by the options.