Browse Prior Art Database

Automatic Tuner for Optimizing Compilers

IP.com Disclosure Number: IPCOM000018652D
Original Publication Date: 2003-Jul-30
Included in the Prior Art Database: 2003-Jul-30
Document File: 2 page(s) / 45K

Publishing Venue

IBM

Abstract

Disclosed is a set of computer programs to be shipped with optimizing compilers that will allow the customer to perform some optimization tuning on the target machine before starting to use the compiler in the normal way. The end result of the tuning process is to modify (improve) the machine dependent parameters that are used by the optimizing compiler. The tuning process will have the following steps: 1) Generating A Perfect Sample Program: The first step in the tuning process is to generate a near-perfect optimized program that can be used as a sample for tuning the compiler. This can be done by providing a sample non-optimized program which is shipped with the compiler. This sample program will be the input to a tool which will generate many versions of the sample program and measure the execution time of each version. The tool will then select the version with the best time as the near-perfect sample. 2) Tuning The Optimizer: The near-perfect sample program that was generated from step 1 should be the input to another tool which tunes the optimizer parameters. This tool will be basically the optimizing compiler except that it will change the optimizing parameters based on the input program, rather than change the input program based on the optimizing parameters.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Automatic Tuner for Optimizing Compilers

The two steps of tuning the optimizing compiler are as follows:

1) Generating A Perfect Sample Program:

The compiler should include a set of non-optimized sample programs as part of the compiler tuning tools. These sample programs are carefully written by compiler and computer architecture experts to exhibit different characteristics of a given machine (computer). In other words, the performance of those sample programs should be affected by the machine specific parameters such as cache size, memory size, number of processors, and clock speed.

Each of those sample programs is fed into an exhaustive optimizer which will try to generate different versions of the same program. All the generated versions are basically compiled and optimized with the optimizing compiler. The only difference between the exhaustive optimizer and the optimizing compiler is that the first has more than one value of each machine parameter, while the later has only one value that will guide the optimization. For example, the optimizing compiler might be tuned to produce a perfect instruction schedule, assuming the latency of a load instruction is 2 cycles. The exhaustive optimizer might have different values for the latency of a load instruction (2,8, 16, etc). Those values will be predetermined by a compiler/computer architecture expert. The exhaustive optimizer will generate different version of the same sample program, one version for each value of each computer parameter.

This process may take long time. The output of this process is a set of different versions of the same program with information about the computer parameters that were used for each version of the program.

non-optimized sample program

Exhaustive

Near-perfect Opti...