On 12/3/24 10:07 AM, Richard Biener wrote:
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%.

Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?

Even after 2/2 this speeds up compilation by 5%.

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

Reply via email to