Hello,

> >> >   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?

yes, it would be possible, however, possibly quite error-prone.

> >> >   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?

ivopts remove bivs that they replace, and I suspect that vectorizer
does something similar as well.  I do not know about other optimizers.

Zdenek

Reply via email to