Richard Biener <rguent...@suse.de> writes:
> This disables postreload GCSE the same way we disable GCSE/cprop.
> On the PR36262 testcase this removes
>
>  load CSE after reload              : 129.00 ( 72%)   0.08 (  5%) 130.50 ( 
> 72%)       6 kB (  0%)
>
> With a smaller testcase both PRE and postreload GCSE still run
> and GCSE shows itself roughly 2x the cost of postreload GCSE there
> (still wondering why we have two implementations of the same thing?!)
>
> I've seem postreload CSE pop up a lot on larger testcases while
> PRE turns itself off.
>
> So, does this look reasonable?
>
> Thanks,
> Richard.
>
> 2019-09-02  Richard Biener  <rguent...@suse.de>
>
>       PR rtl-optimization/36262
>       * postreload-gcse.c: Include intl.h and gcse.h.
>       (gcse_after_reload_main): Skip pass if gcse_or_cprop_is_too_expensive
>       says so.

LGTM.  At first I thought:

  unsigned int memory_request = (n_basic_blocks_for_fn (cfun)
                                 * SBITMAP_SET_SIZE (max_reg_num ())
                                 * sizeof (SBITMAP_ELT_TYPE));

might be a bad approximation after reload, but it looks like the
sbitmap sizes are O(ninsns), and so it's probably pretty good after all.

Richard

Reply via email to