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: LOOP_HEADER tree code?


> >   quite a lot at the moment).  To keep the information valid, we need
> >   to prevent optimizations from destroying it (e.g., if the number
> >   is n_1 = n_2 - 1, and this is the last use of n_1, we do not want
> >   DCE to remove it); this is easy to achieve if n_1 would be the
> >   argument of LOOP_HEADER.

You are proposing to complete the ssa representation such that foreach_ssa_uses also iterates over the niter information (a bit like vrp modifies the ssa chains with its extra assert information). Wouldn't it be possible to not insert this niter information in the representation of the program (ie. not inserting a new tree node) but just modify the ssa iterators to also return the expressions that we store on the side?

> >   Without this tree node in IL, we would need
> >   to handle this specially in DCE, and possibly also other optimizers.

What are the other transformations that remove definitions that are not used?


> >2) This statement might make it simpler to ensure that various
> >   optimizers update the loops correctly.
> >
> >I am not quite sure whether this is a good idea, though.  Are there some
> >reasons why not to do this, or any other problems with the idea?
> >
>
> Why not keeping this information outside the IL

I am not sure what you mean by that?

Just keeping the niter info in the loop structure, and not inserting a new node in the IL for storing the niter.


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