Sign in

docs ILE Concepts

The CodeGenTarget LICOPT

The CodeGenTarget LICOPT

You can specify the Licensed Internal Code options (LICOPT) parameter on many of the module and program creation commands, such as Create C Module (CRTCMOD) and Create Bound C Program (CRTBNDC). The LICOPT parameter directs the optimizing translator to use or avoid certain options when it creates the hardware instructions for objects. You can use the LICOPT CodeGenTarget option to provide control over features that are selected by adaptive code generation. Refer to CodeGenTarget for all the possible values of this option.

By selecting the CodeGenTarget=Common option when creating your module and program objects, you can ensure that your software product does not require conversion when it is restored onto customer machines, or when it is first used by your customers. However, you might be giving up some potential performance improvements on machines with more hardware features.

After creating a program object, you might realize that you should have specified which features are allowed to be used in the object. Instead of re-creating the program, you can use the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) command and specify the CodeGenTarget LICOPT parameter on that command. The program is converted, and the optimizing translator uses only those features that you specified.

New features are available for the POWER6, POWER7 and POWER8 levels of the PowerPC® AS architecture. The following CodeGenTarget LICOPT values can be used to control which features are selected by adaptive code generation.

To select POWER8 features (POWER8 includes all features of POWER7 and POWER6), do one of the following:

  • Specify CodeGenTarget=POWER8
  • If running on POWER8 hardware, specify CodeGenTarget=Current

To select POWER7 features (POWER7 includes all features of POWER6 but does not include any POWER8 features), do one of the following:

  • Specify CodeGenTarget=POWER7
  • If running on POWER7 hardware, specify CodeGenTarget=Current
  • If creating for IBM i 7.3, specify CodeGenTarget=Common

To select POWER6 features, but not POWER7 or POWER8 features, do one of the following:

  • Specify CodeGenTarget=POWER6
  • If running on POWER6 hardware, specify CodeGenTarget=Current
  • If creating for IBM i 7.2, specify CodeGenTarget=Common

To prevent the use of POWER6, POWER7, and POWER8 features, do one of the following:

  • Specify CodeGenTarget=Legacy
  • If creating for IBM i 6.1 or IBM i 7.1, specify CodeGenTarget=Common

Features associated with POWER6 hardware include:

  • A hardware decimal floating-point unit
  • Efficient hardware support for ILE pointer handling

Features associated with POWER7 hardware include:

  • A number of new instructions that may speed up certain computations, such as conversions between integer and floating-point values.

Features associated with POWER8 hardware include:

  • New instructions that may speed up floating point operations.

For a module object, use the Display Module (DSPMOD) command with DETAIL(*BASIC) to see the LICOPT options that are applied to that module. For a program or service program object, LICOPT options are associated with each module in the program. Use the Display Program (DSPPGM) or Display Service Program (DSPSRVPGM) command with DETAIL(*MODULE), and then specify option 5 for the modules you want to view. The value of Licensed Internal Code options on one of these display screens might contain CodeGenTarget=model for some models. This indicates that the LICOPT is used to override the default behavior when the module was created, either by directly specifying the LICOPT, or by setting the QIBM_BN_CREATE_WITH_COMMON_CODEGEN environment variable. If such a LICOPT is not present, then the default behavior was not overridden.

For more information about how to display Licensed Internal Code options, refer to Displaying Module and ILE Program Licensed Internal Code Options.