Hello, > On 10/23/06, Zdenek Dvorak <[EMAIL PROTECTED]> wrote: > >Hello, > > > >for project http://gcc.gnu.org/wiki/PreservingLoops, I am considering > >introducing a tree LOOP_HEADER with single argument N (number of > >iterations of the loop), that would be present in IL at the beginning of > >header of each loop. I have following motivations: > > > >1) One of the goals of the project is to avoid recomputing number of > > iterations of loops, and to keep this information (analysing # of > > iterations is fairly expensive, and we recompute this information > > 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. Without this tree node in IL, we would need > > to handle this specially in DCE, and possibly also other optimizers. > >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? IMHO this is what I propose the LOOP_HEADER tree node for. > and making sure that code > transformers are updating that information if they modify the symbols > involved > in that representation? > > The same problems will also occur when transmitting to the backend > other informations attached to loop structures. I'm not sure that > we want to create a new node for data dependences as well... for data dependences, you need to transfer just dependence vectors/distances, i.e., you do not need to worry about symbols. So I do not see a reason for using some node in IL for data dependences. Zdenek