diff options
author | Richard Biener <rguenther@suse.de> | 2024-04-02 12:31:04 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-04-03 08:56:45 +0200 |
commit | e7b7188b1cf8c174f0e890d4ac279ff480b51043 (patch) | |
tree | fa0547bbce28802c3410647f94608063d54ceed5 /libquadmath/printf/printf_fp.c | |
parent | 8677182f32234786fccce25583232ec5181dde75 (diff) | |
download | gcc-e7b7188b1cf8c174f0e890d4ac279ff480b51043.zip gcc-e7b7188b1cf8c174f0e890d4ac279ff480b51043.tar.gz gcc-e7b7188b1cf8c174f0e890d4ac279ff480b51043.tar.bz2 |
tree-optimization/114557 - reduce ehcleanup peak memory use
The following reduces peak memory use for the PR114480 testcase at -O1
which is almost exclusively spent by the ehcleanup pass in allocating
PHI nodes. The free_phinodes cache we maintain isn't very effective
since it has effectively two slots, one for 4 and one for 9 argument
PHIs and it is only ever used for allocations up to 9 arguments but
we put all larger PHIs in the 9 argument bucket. This proves
uneffective resulting in much garbage to be kept when incrementally
growing PHI nodes by edge redirection.
The mitigation is to rely on the GC freelist for larger sizes and
thus immediately return all larger bucket sized PHIs to it via ggc_free.
This reduces the peak memory use from 19.8GB to 11.3GB and compile-time
from 359s to 168s.
PR tree-optimization/114557
PR tree-optimization/114480
* tree-phinodes.cc (release_phi_node): Return PHIs from
allocation buckets not covered by free_phinodes to GC.
(remove_phi_node): Release the PHI LHS before freeing the
PHI node.
* tree-vect-loop.cc (vectorizable_live_operation): Get PHI lhs
before releasing it.
Diffstat (limited to 'libquadmath/printf/printf_fp.c')
0 files changed, 0 insertions, 0 deletions