Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ umerge(1-SysV) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ucode(1)

btou(1)



UMERGE(1-SysV)                                                  UMERGE(1-SysV)



NAME
     umerge - Ucode Inliner

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

DESCRIPTION
     umerge, the 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 structures, including the program call graph.  This pass also
     copies all top-level non-procedure ucode to the output buffer.  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 procedures, 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 additional
     optimizations that naturally belong to it.  For FORTRAN 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.

     -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



                                                                        Page 1





UMERGE(1-SysV)                                                  UMERGE(1-SysV)



             overhead in the later optimization 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.

     -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 specified in this option does not need to be a
             whole number.

     -inlineto value
             The default value of this parameter is 0. A positive value of
             this parameter asks umerge to perform additional inlining of
             calls to leaf routines up to the specified level, in addition to
             its automatic decision mechanism. A value of 1 will cause all
             calls to leaf procedures to be inlined.  A value of 2 will
             additionally cause all calls to procedures that became leaves due
             to level 1 inlining to be inlined, etc.  Under this option, a
             procedure will become a leaf in the inlined output code if and
             only if the procedure's maximum distance from a leaf in the call
             graph is less than or equal to the value of this parameter.  This
             option is not affected by the -noinline option.

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

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




                                                                        Page 2



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