public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/111554] [12/13/14 regression] Timeout with with "-O3 -fno-dse -fno-inline -fno-store-merging -fno-toplevel-reorder -fno-tree-dce -fno-tree-dse" since r12-2097-g9f34b780b0461e Date: Wed, 17 Jan 2024 07:48:20 +0000 [thread overview] Message-ID: <bug-111554-4-GBJvNUycaU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111554-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111554 --- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>: https://gcc.gnu.org/g:0c42d1782e48d8ad578ace2065cce9b3615f97c0 commit r14-8174-g0c42d1782e48d8ad578ace2065cce9b3615f97c0 Author: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> Date: Sun Nov 19 08:43:05 2023 +0000 sched-deps.cc (find_modifiable_mems): Avoid exponential behavior [PR96388] This patch avoids sched-deps.cc:find_inc() creating exponential number of dependencies, which become memory and compilation time hogs. Consider example (simplified from PR96388) ... === sp=sp-4 // sp_insnA mem_insnA1[sp+A1] ... mem_insnAN[sp+AN] sp=sp-4 // sp_insnB mem_insnB1[sp+B1] ... mem_insnBM[sp+BM] === [For simplicity, let's assume find_inc(backwards==true)]. In this example find_modifiable_mems() will arrange for mem_insnA* to be able to pass sp_insnA, and, while doing this, will create dependencies between all mem_insnA*s and sp_insnB -- because sp_insnB is a consumer of sp_insnA. After this sp_insnB will have N new backward dependencies. Then find_modifiable_mems() gets to mem_insnB*s and starts to create N new dependencies for _every_ mem_insnB*. This gets us N*M new dependencies. In PR96833's testcase N and M are 10k-15k, which causes RAM usage of 30GB and compilation time of 30 minutes, with sched2 accounting for 95% of both metrics. After this patch the RAM usage is down to 1GB and compilation time is down to 3-4 minutes, with sched2 no longer standing out on -ftime-report or memory usage. gcc/ChangeLog: PR rtl-optimization/96388 PR rtl-optimization/111554 * sched-deps.cc (find_inc): Avoid exponential behavior.
next prev parent reply other threads:[~2024-01-17 7:48 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-23 16:57 [Bug c/111554] New: Timeout with with "-O3 -fno-dse -fno-inline -fno-store-merging -fno-toplevel-reorder -fno-tree-dce -fno-tree-dse" 19373742 at buaa dot edu.cn 2023-09-23 16:57 ` [Bug c/111554] " 19373742 at buaa dot edu.cn 2023-09-23 17:02 ` [Bug rtl-optimization/111554] " pinskia at gcc dot gnu.org 2023-10-22 23:46 ` [Bug rtl-optimization/111554] [12/13/14 regression] " sjames at gcc dot gnu.org 2023-10-22 23:55 ` pinskia at gcc dot gnu.org 2023-10-23 3:27 ` [Bug rtl-optimization/111554] [12/13/14 regression] Timeout with with "-O3 -fno-dse -fno-inline -fno-store-merging -fno-toplevel-reorder -fno-tree-dce -fno-tree-dse" since r12-2097-g9f34b780b0461e sjames at gcc dot gnu.org 2023-10-23 3:48 ` pinskia at gcc dot gnu.org 2023-10-23 3:53 ` pinskia at gcc dot gnu.org 2023-10-23 4:52 ` pinskia at gcc dot gnu.org 2023-10-23 5:01 ` pinskia at gcc dot gnu.org 2023-10-23 9:54 ` rguenth at gcc dot gnu.org 2023-10-30 13:47 ` mkuvyrkov at gcc dot gnu.org 2023-11-19 8:47 ` mkuvyrkov at gcc dot gnu.org 2023-11-20 8:18 ` rguenth at gcc dot gnu.org 2023-11-20 12:09 ` mkuvyrkov at gcc dot gnu.org 2024-01-17 7:48 ` cvs-commit at gcc dot gnu.org [this message] 2024-01-17 8:42 ` [Bug rtl-optimization/111554] [12/13 " rguenth at gcc dot gnu.org 2024-01-17 10:18 ` mkuvyrkov at gcc dot gnu.org 2024-01-17 12:35 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-111554-4-GBJvNUycaU@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).