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: Why gimplification regimplifies things?


On Fri, Jan 30, 2004 at 01:26:01AM +0100, Zdenek Dvorak wrote:
> I am speaking just generally, without any specific case in mind...

Ah.  In that case, what *should* happen is that a function that
performs gimplification should either

  (1) Rearrange the local node without regard to its arguments,
      and then return GS_OK.  We then process the node again,
      at some point not rearranging again, and the processing
      the arguments.

      At this point we've done no extra work, since the arguments
      are only processed once.  Normally this kind of transformation
      simply canonicalizes a node; reprocessing the node is just
      easier than duplicating code.

  (2) The local node gimplifies its arguments first, then does
      some local transformation that results in gimple output,
      and then returns GS_ALL_DONE.  This causes us to not 
      re-process the node.

Sometimes, however, the local transform isn't sure if the result
is gimple, and it returns GS_OK instead.  This should not happen
often, but it was hard to avoid in all cases.


r~


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