On Mon, Nov 04, 2019 at 03:23:20PM +0100, Martin Liška wrote:
> The patch adds a new pass that identifies a series of if-elseif
> statements and transform then into a GIMPLE switch (if possible).
> The pass runs right after tree-ssa pass and I decided to implement
> matching of various forms that are introduced by folder (fold_range_test):

Not a review, just a few questions:

1) what does it do if __builtin_expect* has been used, does it preserve
   the probabilities and if in the end decides to expand as ifs, are those
   probabilities retained through it?
2) for the reassoc-*.c testcases, do you get identical or better code
   with the patch?
3) shouldn't it be gimple-if-to-switch.c instead?
4) what code size effect does the patch have say on cc1plus (if you don't
   count the code changes of the patch itself, i.e. revert the patch in the
   stage3 and rebuild just the stage3)?

> +struct case_range
> +{
> +  /* Default constructor.  */
> +  case_range ():
> +    m_min (NULL_TREE), m_max (NULL_TREE)

I admit I'm never sure about coding conventions for C++,
but shouldn't there be a space before :, or even better :
be on the next line before m_min ?

        Jakub

Reply via email to