]> gcc.gnu.org Git - gcc.git/commit
c: Fix compile time hog in c_genericize [PR107127]
authorJakub Jelinek <jakub@redhat.com>
Wed, 23 Nov 2022 18:09:31 +0000 (19:09 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 23 Nov 2022 18:09:31 +0000 (19:09 +0100)
commit8a0fce6a51915c29584427fd376b40073c328090
tree4598badc17f58607c19570cf8d7703161fcd20da
parentc087fe834b19d6c281ce25f729d891bcd14ce404
c: Fix compile time hog in c_genericize [PR107127]

The complex multiplications result in deeply nested set of many SAVE_EXPRs,
which takes even on fast machines over 5 minutes to walk.
This patch fixes that by using walk_tree_without_duplicates where it is
instant.

2022-11-23  Andrew Pinski  <apinski@marvell.com>
    Jakub Jelinek  <jakub@redhat.com>

PR c/107127
* c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
instead of walk_tree for c_genericize_control_r.

* gcc.dg/pr107127.c: New test.
gcc/c-family/c-gimplify.cc
gcc/testsuite/gcc.dg/pr107127.c [new file with mode: 0644]
This page took 0.065364 seconds and 5 git commands to generate.