Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - certain user functions are expanded in-line. the criteria for which http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Certain user functions are expanded in-line.  The criteria for which
functions are selected for in-line expansion is based on the "size" of the
function in terms of the number of "quads" generated by the function.  A
quad (quadruple) consists of four components:  an operator, two arguments
and a result (hence the name).  All expressions can be decomposed into a
series of quads.  For example, the statement a = -b * (c + d) can be broken
down into the following quads.

     OP      ARG1    ARG2    RESULT
     ------- ------- ------- ------
     uminus  b       _       t1
     +       c       d       t2
     *       t1      t2      t3
     =       t3      _       a

The number of "quads" generated corresponds closely with the number of
operators used in an expression.  Functions which require more than "<num>"
quads are not expanded in-line.  The default number is 20.  This
optimization is useful when locally-referenced functions are small in size.

Example:

     C>compiler_name dhrystone /oe

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson