On Wed, Oct 15, 2014 at 01:40:49PM +0200, Richard Biener wrote:
> 
> This adds a bunch of simplifications with constant operands
> or ones that simplify to constants, such as a + 0, x * 1.
> 
> It's a patch mainly to get a few questions answered for further
> pattern merges:
> 
>  - The branch uses multiple .pd files and includes them from
>    match.pd trying to group related stuff together.  It has
>    become somewhat difficult to do that grouping in some
>    sensible manner so I am not sure this is the best approach.
>    Any opinion?  We can simply put everything into match.pd
>    and group visually by overall comments.

That would be probably my preference, unless match.pd grows too big.

>  - Each pattern I will add will either be already implemented
>    in some form in fold-const.c or tree-ssa-forwprop.c.  Once
>    the machinery is exercised from fold-const.c and
>    tree-ssa-forwprop.c I can remove the duplicates at the
>    same time I add a pattern.  Should I do that?

I guess it depends, if the new pattern covers the old one well, sure,
the STRIP_{,SIGN_}NOPS issues might be more important, TREE_SIDE_EFFECTS
probably less important (those shouldn't be really constant expressions
and thus there should be fewer users expecting stuff to be folded).

In any cases, we need to be prepared to cure some folding
regressions if people report them and we find them desirable to be
restored.  Hopefully there won't be hundreds of such reports.

        Jakub

Reply via email to