public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization
@ 2008-01-17 7:21 eres at il dot ibm dot com
2008-01-17 9:20 ` [Bug rtl-optimization/34826] " eres at il dot ibm dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: eres at il dot ibm dot com @ 2008-01-17 7:21 UTC (permalink / raw)
To: gcc-bugs
Running the attached testcase with trunk r131577 on SPU
with -dm -fmodulo-sched -O2 flags (which enables also do-loop optimization)
demonstartes the fact that the branch probability is not reserved with do-loop
optimization.
This causes a major preformance regression (of about 40%) when tested with some
similar benchmark as there is no hardware branch prediction on SPU.
--
Summary: branch probability is not reserved with do-loop
optimization
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eres at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/34826] branch probability is not reserved with do-loop optimization
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
@ 2008-01-17 9:20 ` eres at il dot ibm dot com
2008-01-17 9:33 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: eres at il dot ibm dot com @ 2008-01-17 9:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from eres at il dot ibm dot com 2008-01-17 07:21 -------
Created an attachment (id=14955)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14955&action=view)
The testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/34826] branch probability is not reserved with do-loop optimization
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
2008-01-17 9:20 ` [Bug rtl-optimization/34826] " eres at il dot ibm dot com
@ 2008-01-17 9:33 ` steven at gcc dot gnu dot org
2008-01-17 9:53 ` [Bug rtl-optimization/34826] branch probability is not updated " eres at il dot ibm dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-01-17 9:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2008-01-17 07:31 -------
Can you show in an RTL dump why you are sure that the branch probabilities are
lost?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/34826] branch probability is not updated with do-loop optimization
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
2008-01-17 9:20 ` [Bug rtl-optimization/34826] " eres at il dot ibm dot com
2008-01-17 9:33 ` steven at gcc dot gnu dot org
@ 2008-01-17 9:53 ` eres at il dot ibm dot com
2008-01-17 18:43 ` eres at il dot ibm dot com
2008-01-20 6:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: eres at il dot ibm dot com @ 2008-01-17 9:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from eres at il dot ibm dot com 2008-01-17 08:17 -------
(In reply to comment #2)
> Can you show in an RTL dump why you are sure that the branch probabilities are
> lost?
Sure, I am currently testing a patch we have to fix this problem,
the following '-' lines are from the SMS dump generated with current trunk and
the '+' lines are generated from trunk containing the fix.
@@ -1955,7 +1955,7 @@
(if_then_else (ne:SI (reg:SI 204 [ n ])
(const_int 0 [0x0]))
(label_ref:SI 145)
- (pc))) 356 {*spu.md:3450} (expr_list:REG_BR_PROB (const_int 5000
[0x1388])
+ (pc))) 356 {*spu.md:3450} (expr_list:REG_BR_PROB (const_int 9100
[0x238c])
(nil)))
;; End of basic block 8 -> ( 10 9)
;; lr out 1 [$sp] 127 [$127] 128 [$vfp] 129 [$vap] 176 177 178 179 180
181 183 201 204
@@ -2015,8 +2015,8 @@
;; reg 204 { d110(bb 8 insn 104) }
-;; Succ edge 10 [50.0%] (dfs_back)
-;; Succ edge 9 [50.0%] (fallthru,loop_exit)
+;; Succ edge 10 [91.0%] (dfs_back)
+;; Succ edge 9 [9.0%] (fallthru,loop_exit)
--
eres at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|branch probability is not |branch probability is not
|reserved with do-loop |updated with do-loop
|optimization |optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/34826] branch probability is not updated with do-loop optimization
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
` (2 preceding siblings ...)
2008-01-17 9:53 ` [Bug rtl-optimization/34826] branch probability is not updated " eres at il dot ibm dot com
@ 2008-01-17 18:43 ` eres at il dot ibm dot com
2008-01-20 6:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: eres at il dot ibm dot com @ 2008-01-17 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from eres at il dot ibm dot com 2008-01-17 18:28 -------
A patch was committed to trunk -r131604
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/34826] branch probability is not updated with do-loop optimization
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
` (3 preceding siblings ...)
2008-01-17 18:43 ` eres at il dot ibm dot com
@ 2008-01-20 6:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-20 6:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-01-20 04:52 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34826
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-20 4:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 7:21 [Bug rtl-optimization/34826] New: branch probability is not reserved with do-loop optimization eres at il dot ibm dot com
2008-01-17 9:20 ` [Bug rtl-optimization/34826] " eres at il dot ibm dot com
2008-01-17 9:33 ` steven at gcc dot gnu dot org
2008-01-17 9:53 ` [Bug rtl-optimization/34826] branch probability is not updated " eres at il dot ibm dot com
2008-01-17 18:43 ` eres at il dot ibm dot com
2008-01-20 6:02 ` pinskia at gcc dot gnu dot org
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).