On Mon, Jan 17, 2022 at 8:56 PM Andrew MacLeod via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> As mentioned in the PR, this demonstrates the potentially quadratic
> performance behaviour of adding transitive relations over a series of
> cascading calculations.
>
> As the lookup in a basic block is also linear in nature, I think for
> this release it makes sense to simply limit the number of relations we
> can register in any given block.
>
> I compiled all the c++ files in gcc, and there was only one BB in
> fold-const that had more than 30 relations.. and it was a smaller case
> of this sort of transitive behaviour..  and it capped out at 120 relations.
>
> I added a new --param, and defaulted it to 200.  It has a range of
> 0-9999, choosing 0 would in effect turn off relations.. which is also
> handy.  Caveat: this flag does not affect equivalences since they are
> processed in a completely different way.
>
> I ran the testcase with the max 9999 and it finished fine.
>
> I couldn't create  a simple/smallish testcase to run, so I didn't
> include one.
>
> Bootstraps on x86_64-pc-linux-gnu with no regressions. OK for trunk?

OK.

Thanks,
Richard.

> Andrew
>

Reply via email to