SSA simplify passes
Matthew Fluet
fluet@CS.Cornell.EDU
Sat, 5 Jan 2002 15:29:45 -0500 (EST)
> > md5 -- if you look at the .ssa of -loop-passes 1, you'll see three
> > functions all of the form:
> > fun x_148 (x_154) = L_88 ()
> > L_88 ()
> > ()
> > which are used in about 45 non-tail calls. Before the last removeUnused
> > call, these functions do somthing, but their results aren't used, so they
> > are trimmed down to:
> ...
> > which the shinker reduces to the above (this explains why removeUnused
> > didn't eliminate the function argument, although it is clearly unused in
> > the final function).
> >
> > I think that just eliminating those extraneous non-tail calls sped it up
> > quite a bid.
>
> Cool. Maybe what we need is some count of how many opts the last
> shrink did, and if there werw a lot done, we re-run the simplifier.
Not quite sure what you mean here -- rerun the whole set of simplifier
passes? Another option might be a fast set of passes that could be
repeatedly applied according to some heuristics. Mostly to take care of
the "obvious cases" like the above -- if there are any really really small
functions, run the inliner.
> constants. Because of that, I don't think that's a good benchmark, so
> I changed it so that the array is nonconstant.
Did you check in a change? I haven't seen it. But, I agree that that
makes the benchmark more useful.
> > nucleic: Looking at the datatypes of the -loop-passes 2 version, my guess
> > is too much flattening of tuples. In particular, something like this
> > looks bad:
> ...
>
> Yuck. Maybe arg flattening should only happen if a large fraction of
> the selects are inevitable.
It might be worth looking at.