public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/9240] wierd scheduling on v850 unless -fno-sched-spec specified
[not found] <20030109010600.9240.miles@gnu.org>
@ 2003-06-02 4:29 ` pinskia@physics.uc.edu
2003-08-23 1:44 ` [Bug optimization/9240] weird " dhazeghi at yahoo dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-02 4:29 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-06-02 04:29:26
date| |
------- Additional Comments From pinskia@physics.uc.edu 2003-06-02 04:29 -------
Acording to the submitter the problem is still there and looks like -fno-sched-spec fixes
the problem.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified
[not found] <20030109010600.9240.miles@gnu.org>
2003-06-02 4:29 ` [Bug optimization/9240] wierd scheduling on v850 unless -fno-sched-spec specified pinskia@physics.uc.edu
@ 2003-08-23 1:44 ` dhazeghi at yahoo dot com
2004-01-15 17:22 ` vmakarov at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23 1:44 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified
[not found] <20030109010600.9240.miles@gnu.org>
2003-06-02 4:29 ` [Bug optimization/9240] wierd scheduling on v850 unless -fno-sched-spec specified 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
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
4 siblings, 0 replies; 6+ messages in thread
From: vmakarov at redhat dot com @ 2004-01-15 17:22 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified
[not found] <20030109010600.9240.miles@gnu.org>
` (2 preceding siblings ...)
2004-01-15 17:22 ` vmakarov at redhat dot com
@ 2005-09-26 15:22 ` pinskia at gcc dot gnu dot org
2005-09-26 22:07 ` steinmtz at us dot ibm dot com
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-26 15:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-26 15:21 -------
I think the patch at
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00370.html
will fix this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified
[not found] <20030109010600.9240.miles@gnu.org>
` (3 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: steinmtz at us dot ibm dot com @ 2005-09-26 22:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steinmtz at us dot ibm dot com 2005-09-26 22:07 -------
Unless the common infrastructure bb frequency and edge probabilities have been
updated to reflect builtin_expect, http://gcc.gnu.org/ml/gcc-patches/2005-
09/msg00370.html probably won't fix this problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/9240] weird scheduling on v850 unless -fno-sched-spec specified
[not found] <bug-9240-4642@http.gcc.gnu.org/bugzilla/>
@ 2010-02-24 21:20 ` law at redhat dot com
0 siblings, 0 replies; 6+ messages in thread
From: law at redhat dot com @ 2010-02-24 21:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from law at redhat dot com 2010-02-24 21:20 -------
This was fixed at some point; I don't know if it was the patch referenced in
comment #6, or some other patch or some combination thereof.
You can see that probabilities are being propagated down through to the
scheduler by looking at the .sched dump:
(insn 9 7 10 2 j.c:8 (set (cc0)
(compare (reg:SI 39 [ prephitmp___4 ])
(reg:SI 42))) 8 {*cmpsi} (expr_list:REG_DEAD (reg:SI 42)
(expr_list:REG_EQUAL (compare (reg:SI 39 [ prephitmp___4 ])
(const_int -125 [0xffffffffffffff83]))
(nil))))
(jump_insn 10 9 11 2 j.c:8 (set (pc)
(if_then_else (lt (cc0)
(const_int 0 [0x0]))
(label_ref 15)
(pc))) 41 {*branch_normal} (expr_list:REG_BR_PROB (const_int 9996
[0x270c])
(nil))
-> 15)
;; End of basic block 2 -> ( 3 4)
;; lr out 3 [sp] 29 [r29] 32 [.fp] 33 [.ap] 39
;; live out 3 [sp] 29 [r29] 32 [.fp] 33 [.ap] 39
;; Succ edge 3 [0.0%] (fallthru)
;; Succ edge 4 [100.0%]
Note how the probability of the edge 2->3 is now zero, reflecting the unlikely
attribute while the edge 2->4 is 100%. With the correct probabilities the
scheduler naturally does the right thing.
--
law at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9240
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-24 21:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20030109010600.9240.miles@gnu.org>
2003-06-02 4:29 ` [Bug optimization/9240] wierd scheduling on v850 unless -fno-sched-spec specified 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
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
[not found] <bug-9240-4642@http.gcc.gnu.org/bugzilla/>
2010-02-24 21:20 ` law at redhat dot com
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).