]> git.ipfire.org Git - thirdparty/gcc.git/commit
Maintain complex constraint vector order during PTA solving
authorRichard Biener <rguenther@suse.de>
Tue, 23 Jul 2024 12:05:47 +0000 (14:05 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:05:55 +0000 (19:05 +0200)
commitf1ba0ee0f8eebf9c8e1006ef016c240df6d945fc
tree88958c38d88261e6f38e4b87d21e0400c7f9c8f2
parent2d397e3279ed9641f14a45dbf66feb8697253fd6
Maintain complex constraint vector order during PTA solving

There's a FIXME comment in the PTA constraint solver that the vector
of complex constraints can get unsorted which can lead to duplicate
entries piling up during node unification.  The following fixes this
with the assumption that delayed updates to constraints are uncommon
(otherwise re-sorting the whole vector would be more efficient).

* tree-ssa-structalias.cc (constraint_equal): Take const
reference to constraints.
(constraint_vec_find): Similar.
(solve_graph): Keep constraint vector sorted and verify
sorting with checking.
gcc/tree-ssa-structalias.cc