Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uopt(1) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ucode(1)

btou(1)

ppu(1)



UOPT(1)             RISC/os Reference Manual              UOPT(1)



NAME
     uopt - MIPS Ucode Global Optimizer

SYNOPSIS
     uopt unopt_file opt_file [ string_file ] [ -t sym_file -f
     prof_data_file -i ignore_file -l list_file -Olimit count
     -loopunroll count ] [ -v -w -bb -O3 -EL -EB -doassoc
     -f77alias -nor23 -zdbug:n ]

DESCRIPTION
     uopt, the MIPS ucode optimizer, reads the input binary ucode
     file, performs optimization on an intra-procedural, global
     basis and outputs the optimized binary ucode file.  It
     checks the version stamp of the ucode file, and if it does
     not correspond to its own stamp, a warning message will be
     printed.  By convention, unoptimized binary ucode files have
     the extension .B and optimized binary ucode files have the
     extension .O, but uopt does not force this convention on the
     user.  The string file is used for storing string and
     floating-point constants in each procedure during optimiza-
     tion, to save memory space.  If this file name is omitted,
     the file name "uoptstring" is used.  uopt first conducts a
     quick pre-pass over the entire program. In the main optimi-
     zation pass, it reads, optimizes and writes out the pro-
     cedures one by one in same the order that they appear in the
     input file.

     The complexity of global optimization is some exponential
     function of the size of the procedure (in number of basic
     blocks).  Thus, large procedures take enormous amount of
     time to optimize.  Also, if the host machine has only a
     small amount of memory, excessive swapping of memory pages
     between disk physical memory further lengthens the optimiza-
     tion time for large procedures.  uopt will skip optimizing a
     procedure if the number of basic blocks it contains exceeds
     500.  A warning message if given so that the user is aware
     that the procedure is not optimized. The default value of
     500 can be overridden using the -Olimit option.

     The following options are interpreted by uopt.

     -v      Turns on verbose mode.  In this mode, uopt will
             print the name of the procedure it's currently
             optimizing, plus a number enclosed in parentheses
             that tells the number of basic blocks in that pro-
             cedure.  Optimization time is usually some exponen-
             tial function of the number of basic blocks in the
             procedure.  Under -O3 optimization, an "i" after the
             number indicates that inter-procedural register
             allocation is performed for that procedure.

     -w      Suppresses warning messages.



                        Printed 11/19/92                   Page 1





UOPT(1)             RISC/os Reference Manual              UOPT(1)



     -bb     Write out the basic block number as ucode comments
             in the output ucode.  This is useful in debugging
             uopt.

     -O3     Uses the inter-procedural technique when performing
             register allocation.

     -EL     Tells uopt.  that the target machine is little-
             endian.

     -EB     Tells uopt.  that the target machine is big-endian.

     -doassoc
             Performs the re-association optimization for
             floating-point expressions even when the language is
             FORTRAN.  This violates the FORTRAN Standard.

     -f77alias
             Assumes that there's can be aliasing among the
             parameters to a procedure when the language is FOR-
             TRAN.  The FORTRAN Standard allows the assumption by
             compilers that there is never any aliasing among
             parameters. This assumption allows the compiler to
             get better performance for the program.  If a pro-
             gram violates this rule, the program may not run
             correctly after default optimization; using this
             flag will still allow the program to run correctly
             after optimization, only at a reduced performance
             level.

     -nor23 Tells uopt that it should not use register 23.

     -zdbug:n
             Tells uopt to print different debugging traces,
             depending on the value of n given.  Traces are
             printed on a per-procedure basis, and output to the
             list file specified in the -l option.  The traces
             always begin with the control flow graph of the pro-
             cedure.  For value 1, the local hash table and the
             global hash table are printed.  For value 2, the
             local hash table, the global hash table are printed;
             the bit vectors for the local attributes are then
             printed on a per-basic-block basis.  For value 3,
             the global hash table is printed, followed by the
             bit vectors for the partial redundancy data flow
             analysis.  For value 4, the global hash table is
             printed, followed by the bit vectors to determine
             the live ranges of global common subexpressions.
             For value 5, the global hash table is printed, fol-
             lowed by the live range information for all the
             register-residing candidates, followed by the bit
             vectors related to register allocation.  For value



 Page 2                 Printed 11/19/92





UOPT(1)             RISC/os Reference Manual              UOPT(1)



             6, a trace of the global register allocation via
             priority-based coloring is printed.  For value 7,
             the inter-procedural register allocation information
             is printed.

     -t sym_file
             Tells uopt the name of the symbol table file.

     -f prof_data_file
             Tells uopt the name of the profile data file.  At
             the same time, this flag causes uopt to use the
             actual execution frequencies in the profile data in
             making register allocation decision. When this flag
             is used, the symbol table file must also be speci-
             fied using the -t flag.

     -i ignore_file
             Tells uopt to ignore specific procedures and leave
             them unoptimized.  The procedures whose optimization
             is to be suppressed are listed in arbitrary order in
             the given file, with each line containing one pro-
             cedure name starting at the first column.

     -l list_file
             Uses the given file to print diagnostic information
             during optimization.

     -Olimit count
             Set this parameter to the given value.  uopt will
             not optimize a procedure whose size in terms of
             number of basic blocks exceeds this value.

     -loopunroll count
             Set the maximum number of times that a loop will be
             unrolled.  The default value is 4.  Setting it to 0
             or 1 will disable loop unrolling.

SEE ALSO
     ucode(1), btou(1), ppu(1),

DIAGNOSTICS
     uopt assumes the input ucode file is error-free.  However,
     it does output warning messages when it runs into special
     situations during optimization.











                        Printed 11/19/92                   Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026