This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "Documentation by paper"


> Of course not, but it's always useful to define each term used at least
> to some extent.  GCC has always been pretty self-contained and I see no
> reason to change that policy at this point.

Lovely policy indeed, but the way GCC is designed has changed a lot in the
last decade.  Passes like CSE, reload and combine, while very simple in
their basic work, are full of ad-hoc tests and are very low-level: you
cannot understand them actually unless you understand what kind of RTL
previous pass are expected to produce.

Look at this (7 November 2002) discussion between Zack Weinberg and Richard
Henderson to uinderstand what I mean:

zw  Staring at toplev.c for awhile leads me to believe that the right fix
    for this is to run GCSE _before_ CSE, and make GCSE aware of
    CONSTANT_P_RTX.  The appended patch does just that.  Since this is a
    drastic change, I will also check what overall effect this has on code
    quality by examining bootstrap times and the size of the generated
    compiler.
    --
rth I wonder if this means we can get rid of one of the local cse
    passes?  It wouldn't surprise me if this is indeed now redundant,
    since gcse has acquired some local propagation skills.
    --
zw  What actually happens is it blows up compiling libgcc, due to some
    construct or other that simplify-rtx.c doesn't know how to handle but
    cse's simplifiers do.  I haven't yet dug into this.
    --
rth I should have remembered this.  cse1 is needed so that we
    propagate addressof into memories.  Addressof elimination
    needs to happen before gcse because gcse can't handle
    aliasing memory and registers.
    --
zw  How hard would it be to teach gcse about aliasing
    memory and registers?
    --
rth Very.

Everybody with less than guru knowledge of gcc asks, why.  And why CSE
propagates addressof into memories.  And who takes care of it for
nonoptimizing compilation.  And whether it is even needed for nonoptimizing
compilation.  And the flow of thought goes on.

Passes that are developed right now, especially as part of the tree-ssa work
(but also Jan and Zdenek's rtlopt work), work at a different, more generic
level, and require a different kind of culture on the reader.

Paolo





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]