public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-9540] rtl-optimization/80960 - avoid creating garbage RTL in DSE
@ 2021-05-18 7:05 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-05-18 7:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6cb5edbf7e6724ff014954863989d7444ee84c6a
commit r9-9540-g6cb5edbf7e6724ff014954863989d7444ee84c6a
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jan 27 15:35:52 2021 +0100
rtl-optimization/80960 - avoid creating garbage RTL in DSE
The following avoids repeatedly turning VALUE RTXen into
sth useful and re-applying a constant offset through get_addr
via DSE check_mem_read_rtx. Instead perform this once for
all stores to be visited in check_mem_read_rtx. This avoids
allocating 1.6GB of garbage PLUS RTXen on the PR80960
testcase, fixing the memory usage regression from old GCC.
2021-01-27 Richard Biener <rguenther@suse.de>
PR rtl-optimization/80960
* dse.c (check_mem_read_rtx): Call get_addr on the
offsetted address.
(cherry picked from commit a523add327c6cfdd68cf9b788ea808068d0f508c)
Diff:
---
gcc/dse.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/dse.c b/gcc/dse.c
index a63890d8f60..0a84b751c2a 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -2144,6 +2144,11 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info)
}
if (maybe_ne (offset, 0))
mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
+ /* Avoid passing VALUE RTXen as mem_addr to canon_true_dependence
+ which will over and over re-create proper RTL and re-apply the
+ offset above. See PR80960 where we almost allocate 1.6GB of PLUS
+ RTXen that way. */
+ mem_addr = get_addr (mem_addr);
if (group_id >= 0)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-18 7:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 7:05 [gcc r9-9540] rtl-optimization/80960 - avoid creating garbage RTL in DSE Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).