Jeff Law wrote:
Thanks. Does running the phi-only propagator after the loop header copying help? At first glance it would seem that it ought to propagate the values of those degenerate PHIs then eliminate those PHIs.

It was written to cleanup after jump threading which has a tendency to create very similar code to what you've shown below and to do so very quickly.

Thanks for the tip - this fixes up some examples, but not at all. Other examples require also a call to rewrite_into_loop_closed_ssa and recomputing dominators...maybe I can get everything to work with all of those, but my feeling is to keep it as a pass: if the first pass_ch justifies being a pass in its own right, then surely a *more aggressive* version of that, does too...

Reply via email to