Example Use of Feedback Directed Optimization

These steps illustrate the creation and use of feedback directed optimization.

  1. Generate profile information.
  2. cl2000 --opt_level=2 --gen_profile_info foo.c --run_linker --output_file=foo.out --library=lnk.cmd --library=rts2800_ml.lib
  3. Execute the application.
  4. The execution of the application creates a PDAT file named pprofout.pdat in the current (host) directory. The application can be run on target hardware connected to a host machine.

  5. Process the profile data.
  6. After running the application with multiple data-sets, run pdd2000 on the PDAT files to create a profile information (PRF) file to be used with --use_profile_info.

    pdd2000 -e foo.out -o pprofout.prf pprofout.pdat
  7. Re-compile using the profile feedback file.
  8. cl2000 --opt_level=2 --use_profile_info=pprofout.prf foo.c --run_linker --output_file=foo.out --library=lnk.cmd --library=rts2800_ml.lib