IPA restrictions and limitations

  • You cannot use either the UPDPGM or UPDSRVPGM on a bound program or service program that IPA has optimized.
  • You cannot debug any programs or service programs that IPA has optimized with the normal source debug facilities. This is because IPA does not maintain debug information within the IL data and in fact throws away any debug information when it generates the output partitions. As such, the source debugger does not handle IPA programs or service programs.
  • There is a limit of 10,000 output partitions. If you reach this limit, the bind will fail, and the system will send a message. If you reach this limit, you should run the CRTPGM or CRTSRVPGM command again, and specify a larger partition size. See the partition directive in IPA control file syntax.
  • There are certain IPA limitations that may apply to your program if that program contains SQL data. If the compiler that you use allows an option to keep the IL data, then these limitations do not apply. If the compiler you use does not allow an option to keep the IL data, you must perform the steps listed below to use IPA on a program containing SQL data. For example, consider a C program with embedded SQL statements. You would normally compile this source with the CRTSQLCI command; however, that command does not have a MODCRTOPT(*KEEPILDTA) option.
    Perform the following steps to create a *MODULE that contains both embedded SQL data and IL data.
    1. Compile an SQL C source file with the CRTSQLCI command. Specify the OPTION(*NOGEN) and the TOSRCFILE(QTEMP/QSQLTEMP) compiler options. This step precompiles the SQL statements and places the SQL precompiler data into the associated space of the original source file. It also places the C source into a member with the same name in temporary source physical file QTEMP/QSQLTEMP.
    2. Compile the C source file in QTEMP/QSQLTEMP with the MODCRTOPT(*KEEPILDTA) option on the compiler command. This action creates an SQL C *MODULE object, and propagates the preprocessor data from the associated space of the original source file into the module object. This *MODULE object also contains the IL data. At this point, you can specify the *MODULE object on the CRTPGM or CRTSRVPGM command with the IPA(*YES) parameter.
  • IPA cannot optimize modules that you compile at optimization level 10 (*NONE). IPA requires information within the IL data that is available only at higher optimization levels.
  • IPA cannot optimize modules that do not contain IL data. Because of this, IPA can optimize only those modules that you create with compilers that offer the MODCRTOPT(*KEEPILDTA) option. Currently, this includes the C and C++ compilers.
  • For a program, the module containing the program entry point, which is typically the main function, must have the correct attributes as noted above, or IPA will fail. For a service program, at least one of the modules containing exported functions must have the correct attributes as noted above, or IPA will fail. It is desirable that the other modules within the program or service program also have the correct attributes, but it is not required. Any modules without the correct attributes will be accepted by IPA, but they will not be optimized.
  • IPA might not be able to correctly optimize modules compiled with the RTBND(*LLP64) option on either the Create C++ Module (CRTCPPMOD) or Create Bound C++ Program (CRTBNDCPP) command. If virtual functions are not used in the module, then IPA can optimize the module. If virtual functions are used, then the MODCRTOPT(*NOKEEPILDTA) option should be specified.
  • IPA might not be able to correctly optimize modules that contain decimal floating-point data or variables.
  • IPA cannot correctly optimize modules that contain thread local storage variables.