public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amonakov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114261] [13/14 Regression] Scheduling takes excessive time (97%) Date: Mon, 11 Mar 2024 16:30:29 +0000 [thread overview] Message-ID: <bug-114261-4-N60NZfuxAO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114261-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114261 Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mkuvyrkov at gcc dot gnu.org --- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> --- It appears sched-deps is O(N*M) given N reg_pending_barriers and M distinct pseudos in a region (or even a basic block). For instance, on the following testcase #define x10(x) x x x x x x x x x x #define x100(x) x10(x10(x)) #define x10000(x) x100(x100(x)) void f(int); void g(int *p) { #if 1 x10000(f(*p++);) #else x10000(asm("" :: "r"(*p++));) #endif } gcc -O -fschedule-insns invokes add_dependence 20000 times for each asm/call after the first. There is a loop for (i = 0; i < (unsigned)deps->max_reg; i++) { struct deps_reg *reg_last = &deps->reg_last[i]; reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets); SET_REGNO_REG_SET (&deps->reg_last_in_use, i); } that registers the insn with reg_pending_barrier != 0 in reg_last->sets of each pseudo, and then all those reg_last->sets will be inspected on the next reg_pending_barrier insn.
next prev parent reply other threads:[~2024-03-11 16:30 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-07 1:37 [Bug rtl-optimization/114261] New: " patrick at rivosinc dot com 2024-03-07 1:38 ` [Bug rtl-optimization/114261] " patrick at rivosinc dot com 2024-03-07 1:40 ` pinskia at gcc dot gnu.org 2024-03-07 1:40 ` patrick at rivosinc dot com 2024-03-07 7:30 ` amonakov at gcc dot gnu.org 2024-03-07 7:51 ` patrick at rivosinc dot com 2024-03-07 20:36 ` law at gcc dot gnu.org 2024-03-11 16:30 ` amonakov at gcc dot gnu.org [this message] 2024-03-12 7:49 ` [Bug rtl-optimization/114261] [13/14 Regression] Scheduling takes excessive time (97%) since r13-5154-g733a1b777f1 rguenth at gcc dot gnu.org 2024-03-13 3:09 ` law at gcc dot gnu.org 2024-03-13 13:56 ` amonakov at gcc dot gnu.org 2024-03-13 14:08 ` rguenth at gcc dot gnu.org 2024-03-13 15:11 ` amonakov 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-114261-4-N60NZfuxAO@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).