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]

More fun with SSA



Right now our SSA path sits between cse1 and gcse.  For various reasons
I think that's wrong and it would be better if we moved the SSA path
to an earlier point in the compiler.  I have in fact been beating on a couple
targets in this mode for a few weeks and I've become convinced it's the
right thing to do.

  a. It's almost a certainty that for SSA to be useful on RTL that we're
     going to have to have a more gradual lowering of RTL.  In that model
     the SSA path would have the higher level optimizers and the old path
     would consist of the lower level optimizers.

     Thus, it's kind-of silly to have the high level optimizer sit in the
     middle of the low level optimizer path.

  b. By moving the SSA path earlier, we want to be able to reduce the scope
     of the work performed by cse & gcse.  ie, we'd really like to avoid the
     exponential branch following code in cse (and instead rely on the SSA
     optimizers to do equivalent transformations in linear time).

  c. More generally, we want the high level optimizer to reduce the amount
     of work done by the low level optimizer and simplify the inputs to the
     low level optimizer.  That's kind of hard to accomplish when the 
     high level optimizer is in the middle of the low level optimization
     path :-)

  d. By moving SSA up in the path with the expectation that it'll work on
     a higher level RTL, the SSA optimizers themselves become much much
     simpler.  It would be a shame to have to teach the SSA optimizers how
     to deal with HAVE_cc0, HIGH/LO_SUM, and all the target dependent stuff
     that we find in our typical GCC optimizer.

Further discussion of the ideas behind a more gradual lowering of RTL are
mandatory as they'll have some significant long term impacts on the compiler.
However, I'd like to postpone that discussion until I can incorporate the
comments/suggestions from folks I've been discussing these issues with.

If folks want to comment further about moving the SSA path, I'm more than
happy to discuss that and talk about the general ideas behind gradual lowering
of RTL -- I just don't want to dive too deeply into lowering since I believe
I can answer a lot of questions/concerns in my follow-up message about
gradual lowering.

jeff


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