Go to the first, previous, next, last section, table of contents.


Alto Manpage

Invocation

alto {option}*

Options

The following options are available. Please note, that each option should appear at most once. Otherwise, the latest occurence will overwrite all previous ones.

-p
Load pixie profiling information. The filnames are assumed to be the the input file with ".Addrs" or ".Counts" appended. Currently, we only support the new pixie format generated by the latest pixie version. The latest version of OSF/1 (Digital UNIX V4.0) uses atom to emulate pixie. Alto is tuned for the use with pixie profiling information so use it whenever possible
-r [number-of-rounds] (default 5)
Specifies how many rounds the optimizer should run the "easy optimization" at most. The c-compiler shipped with the latest version of OSF/1 (Digital UNIX V4.0) creates binaries that alto cannot handle unless rounds > 0. By "easy optimizations" we mean non-inlining optimization. Currently, alto does "easy optimization" first, then inlining, and finally "easy optimizations" again.
-i [input-file] (default a.out)
Specifies the name of the file that should be optimized.
-o [output-file] (default b.out)
Specifies the name of the file being generated.
-O [optimize-options] (default none disabled)
Disables certain optimizations see section Optimizations If you want to disbable more that one optimization concatenate the corresponding options with an arbitary delimiter, eg. '+'. The complete list of optimizations is changing rapidly. An uptodate overview can be obtained by running the following command in the master source directory. `grep DISABLED_OPT *.c'
-P [print-options] (default none enabled)
Enables the output of certain information. If you want to print out more that one item concatenate the corresponding options with an arbitary delimiter, eg. '+'. The complete list of print item is changing rapidly. An uptodate overview can be obtained by running the following command in the master source directory. `grep PRINT_OPT_WHAT *.c'
-T [time-options] (default "postopt")
This flag lets you choose when to print the print items selected with the -P option. Default is after all optimizations are done. If you want to print out items at more than one point concatenate the corresponding options with an arbitary delimiter, eg. '+'. The complete list of time options is changing rapidly. An uptodate overview can be obtained by running the following command in the master source directory. `grep PRINT_OPT_WHEN *.c'
-M [inline-method] (default Crit)
This flag selects the inline method used by alto. Possible values are: Crit (default),Path,Small, And No. The complete list of methods is changing. An uptodate overview can be obtained by running the following command in the master source directory. `grep INLINE_METHOD *.c'

Preparing Binaries For Processing with ALTO

In order to optimize binaries with alto they have to be linked using the flags listed below. Unfortunately, this does not quite work for the gnu compiler due to a stupid bug that might have been fixed by now. the problem is that gcc and g++ pass the -r flag (from -W,-r) too late to the linker.

Here is a workaround. Run "gcc -v" this tells you which spec file gcc is using. Patch the spec file as follows. Goto the line following "*link:". make "-r " the first three characters in this line. Omit the option "-Wl,-r" in the table below.

compiler
option
cc
-Wl,-r -Wl,-d -Wl,-z -non_shared
f77
-Wl,-r -Wl,-d -Wl,-z -non_shared
gcc
-Wl,-r -Wl,-d -Wl,-z -static
g++
-Wl,-r -Wl,-d -Wl,-z -static

Example Invocations

alto
Runs alto on binary a.out producing an (optimized) binary b.out. No profiling information is used.
alto -i a.rr -o my.exe
Runs alto on binary a.rr producing an (optimized) binary my.exe.
alto -p -i a.rr -o my.exe
As before but profiling information is used and expected to be provided in the files a.rr.Addrs and a.rr.Counts
alto -O Load+Branchtwist
Runs alto as usual on a.out but does not perform load-avoiding and conditional-branch-twist optimizations.

(Known) Bugs


Go to the first, previous, next, last section, table of contents.