Hello, > >> 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. > > > >> 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. > > > > The scev info has the same problem as the niter info, as we store it on > the side, making it vulnerable to any code transform. Now if we modify > the var renaming, removal, ... aware of the information that we store > on the side, we could avoid all these rather costly re-computations.
I did that once. Updating scev info turned out to be more expensive than recomputing it. Zdenek