]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: optimize constraint subsumption [PR118069]
authorPatrick Palka <ppalka@redhat.com>
Thu, 19 Dec 2024 17:00:31 +0000 (12:00 -0500)
committerPatrick Palka <ppalka@redhat.com>
Thu, 19 Dec 2024 17:00:31 +0000 (12:00 -0500)
commit7eac34a6c793540606a50e20c4c56bd98476d3a1
treeb8ba05f1f40f6f2bdc8060c282afde4941282a4e
parent875f14e15d49dce7de501a6357a3d5811b5c36d4
c++: optimize constraint subsumption [PR118069]

Since atomic constraints are interned the subsumption machinery can
safely use pointer instead of structural hashing for them.  This speeds
up compilation of the testcase in the PR from ~3s to ~2s.

PR c++/118069

gcc/cp/ChangeLog:

* constraint.cc (atom_hasher): Define here, instead of ...
* cp-tree.h (atom_hasher): ... here.
* logic.cc (clause::m_set): Use pointer instead of structural
hashing.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/logic.cc