public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vmakarov at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified Date: Thu, 15 Jan 2004 17:22:00 -0000 [thread overview] Message-ID: <20040115172237.20579.qmail@sources.redhat.com> (raw) In-Reply-To: <20030109010600.9240.miles@gnu.org> ------- Additional Comments From vmakarov at redhat dot com 2004-01-15 17:22 ------- Some analysis: 1. Scheduler uses own algorithm of probablity calculation (3 basic blocks of the test have probability 100/50/100%). 2. It should use common infrastructure bb frequency and edge probablility. 3. Even if it used the common infrastructure, bb frequnecies would be still wrong (10000, 9001, 10000 or 100/90/100%). So builtin-expect is ignored in the infrastructure too. I saw broken builtin-expect many times during my 6 years work on gcc. 4. Becuase the probability of the 2nd bb is 50%, it includes 2 insns from it to schedule into the 1st bb. So fixing the problem could be: 1. Taking builtin_expect into account in scheduler algorithm of probablity calculation. 2. Start using the common infrastructure bb frequency and edge probablility and fixing there builtin_expect. Neither the 1st solution nor the 2nd one is easy. And they include the risk of new bugs. So I think it is not reasonable to fix it for 3.4. It is a just generation of non-optimal code (scheduler works by heuristics. there will be always some unoptimal schedules. we are just oriented to guarantee that scheduler improves code in overall on credible benchmarks like Spec). The problem was pressent in 3.3. I'll try to fix the problem in 3-4 months. Vlad -- What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
next prev parent reply other threads:[~2004-01-15 17:22 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20030109010600.9240.miles@gnu.org> 2003-06-02 4:29 ` [Bug optimization/9240] wierd " pinskia@physics.uc.edu 2003-08-23 1:44 ` [Bug optimization/9240] weird " dhazeghi at yahoo dot com 2004-01-15 17:22 ` vmakarov at redhat dot com [this message] 2005-09-26 15:22 ` [Bug rtl-optimization/9240] " pinskia at gcc dot gnu dot org 2005-09-26 22:07 ` steinmtz at us dot ibm dot com
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=20040115172237.20579.qmail@sources.redhat.com \ --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).