]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/116083 - vectorizer slowness
authorRichard Biener <rguenther@suse.de>
Tue, 3 Dec 2024 13:21:47 +0000 (14:21 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 28 Apr 2025 09:27:30 +0000 (11:27 +0200)
commitb30424f43522171e8ffe587e0df0ce3627c88f6c
tree6079a83a4d9b2aac87e6d99e0a11c022d4a3cf91
parentcfeee375eccfa6c7265f166b5ce70eb65b153e4c
middle-end/116083 - vectorizer slowness

Turns out SLP discovery can end up doing a lot of vector type
builds from scalar types.  Those are all ultimatively cached but
end up built and layouted first.  The latter is particularly
expensive because it does tree node arithmetic to compute TYPE_SIZE
and TYPE_SIZE_UNIT.  The following replaces this with the appropriate
poly-int arithmetic which speeds up the testcase by 50%.

PR middle-end/116083
* stor-layout.cc (layout_type): Compute TYPE_SIZE and
TYPE_SIZE_UNIT for vector types from the component mode
sizes.
gcc/stor-layout.cc