Paul Khuong wrote:
> Make some instances of IF/IF conversion more direct
> When faced with CFGs that look like (if (if ...) ...), we duplicate
> the outer NULL test forward in the branches (and jump to the correct
> branch, so very little code is duplicated). However, this transform
> depends on later ir1 optimisation to handle patterns like
> (if (if ... nil t) ...). Try and get them right with a specialised
> rewrite to get good code even when ir1opt doesn't run until fixpoint.
I tried to extend the logic to predicates, but only managed to get it to
fire on (eq (if ...) constant), and with fairly suspect code at that.
Still, patch attached if someone can find the inspiration and energy to
make it work.