Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ucode(1)

btou(1)



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



NAME
     umerge - MIPS Ucode Inliner

SYNOPSIS
     umerge input_file -o inlined_file [ -t sym_file -f
     prof_data_file -i control_file -spacetime value ] [ -v
     -noinline -inlineall -noinittoass -nopromotion ]

DESCRIPTION
     umerge, the MIPS ucode inliner, reads the input binary ucode
     file into an input ucode buffer.  An output ucode buffer is
     then allocated.  umerge then makes a pass over the input
     ucode buffer to collect information and build data struc-
     tures, including the program call graph.  This pass also
     copies all top-level non-procedure ucode to the output
     buffer.  If a profile feedback file is specified, it next
     reads that file to add actual call frequency data to the
     call graph. It then analyzes the data structures to decide
     what to do for the output ucode.  Finally, it copies the
     code from the input buffer to the output buffer according to
     a depth-first, post-order traversal of the program call
     graph.  In this process, procedure bodies are conditionally
     integrated at their points of calls.  When inlining pro-
     cedures, the procedure code is taken from the output buffer.
     This allows the output of integrating procedure A into B to
     be used when procedure B is later integrated into procedure
     C.

     Apart from the above basic functions, umerge also does addi-
     tional optimizations that naturally belong to it.  For FOR-
     TRAN programs, it promotes reference parameters to value
     parameters whenever this can safely be performed.  When the
     actual parameter is a constant, it fetches the constant
     value from the INIT ucode and passes the constants directly.
     When the actual parameter is an initialized variable that is
     never written in the whole program, it also looks up the
     initialized value and passes the constant value directly.

     umerge also recognizes initialized variables that are never
     written into and converts the initializations to run-time
     assignments at the beginning of the procedures.  This allows
     the later global optimizer to perform constant propagation,
     constant folding and dead store elimination to further
     improve the code.

     The following options are interpreted by umerge.

     -v      Turns on verbose mode.  In this mode, umerge will
             print the name of the procedure it is currently
             copying to the output buffer.  It also prints the
             name of the procedure it is inlining at each call
             site.



                        Printed 11/19/92                   Page 1





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



     -noinline
             Suppresses the inlining functionality.  All other
             optimizations are still performed.

     -inlineall
             Inline all calls in the program.  This option should
             only be used with discretion, since it can create
             tremendous optimization overhead in the later optim-
             ization phases.

     -noinittoass
             Turns off umerge's initialization to run-time
             assignment conversion.

     -nopromotion
             Turns off reference parameter to value parameter
             promotion.

     -t sym_file
             Tells umerge the name of the symbol table file.
             This is necessary for umerge to know the names of
             all the procedures.

     -f prof_data_file
             Tells umerge the name of the profile data file.  At
             the same time, this flag causes umerge to use the
             actual execution frequencies in the profile data in
             making inlining decision, rather than relying on
             analyzing loop nests. When this flag is used, the
             symbol table file must also be specified using the
             -t flag.

     -i control_file
             Gives direct control over umerge on the inlining of
             specific procedures.  The control file must be made
             up of lines that start with a "+" or a "-" in the
             first column, followed by a procedure name.  The
             procedures can be listed in arbitrary order in the
             file.  Procedures marked with "+" are always
             inlined, and those marked with "-" are never
             inlined.

     -spacetime value
             Uses the given value for this parameter.  umerge's
             inlining decision is based on this parameter that
             represents space/time tradeoff.  The default value
             is 3.0.  This tells umerge that a size increase of 3
             instructions is worthy of each cycle reduction in
             execution time.  In other words, umerge will inline
             a procedure whenever the inlining causes 3 or less
             additional instructions in code size for every 1
             cycle speedup in execution time.  The value



 Page 2                 Printed 11/19/92





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



             specified in this option does not need to be a whole
             number.

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

DIAGNOSTICS
     umerge assumes the input ucode file is error-free.  Other-
     wise, there is no guarantee on its behavior.














































                        Printed 11/19/92                   Page 3



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