public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40384]  New: [4.5 regression] Revision 148277 failed 148277
@ 2009-06-09 10:23 hjl dot tools at gmail dot com
  2009-06-09 10:24 ` [Bug middle-end/40384] " hjl dot tools at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-09 10:23 UTC (permalink / raw)
  To: gcc-bugs

Revision 148277:

http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00257.html

caused:

http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00257.html

We no longer generate prefetch.


-- 
           Summary: [4.5 regression] Revision 148277 failed 148277
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/40384] [4.5 regression] Revision 148277 failed 148277
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
@ 2009-06-09 10:24 ` hjl dot tools at gmail dot com
  2009-06-09 14:19 ` [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-09 10:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2009-06-09 10:24 -------
Caused:

FAIL: gcc.dg/tree-ssa/prefetch-5.c scan-tree-dump-times aprefetch "Issued
prefetch" 2


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
  2009-06-09 10:24 ` [Bug middle-end/40384] " hjl dot tools at gmail dot com
@ 2009-06-09 14:19 ` rguenth at gcc dot gnu dot org
  2009-06-09 22:37 ` gshobaki at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-09 14:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |tree-optimization
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
  2009-06-09 10:24 ` [Bug middle-end/40384] " hjl dot tools at gmail dot com
  2009-06-09 14:19 ` [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c rguenth at gcc dot gnu dot org
@ 2009-06-09 22:37 ` gshobaki at gcc dot gnu dot org
  2009-06-10 20:15 ` hjl dot tools at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gshobaki at gcc dot gnu dot org @ 2009-06-09 22:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gshobaki at gcc dot gnu dot org  2009-06-09 22:37 -------
The new cost model added in revision 148277 supresses prefetching in a loop
when it is unlikely to be profitable. One such non-profitable case is a loop
with an unknown trip count and a high prefeching cost. The prefetching cost is
modeled by the ratio between the prefetch count and the total instruction count
in a loop. When this ratio is greater than 1/10 in a loop with an unknown trip
count, prefetching is considered non-profitable and no prefetches are issued.
The first two loops in this test case fall under this category, where the trip
count is not known and the prefetch-to-insn ratio is 1/5. Possible fixes are:

1. Add more computation to the loop bodies in the test case to reduce the
prefetch-to-insn ratios and hence make the loops profitable from the cost
model's point of view.
2. Use a commad line option to set the maximum profitable prefetch-to-insn
ratio to 1/5. The syntax is --param min-insn-to-prefetch-ratio=5
3. Change the expected output such that it does not expect prefetches in this
case.

Any feedback on which one is the preferred solution?

Thanks
-Ghassan



-- 

gshobaki at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gshobaki at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2009-06-09 22:37 ` gshobaki at gcc dot gnu dot org
@ 2009-06-10 20:15 ` hjl dot tools at gmail dot com
  2009-06-12  5:00 ` hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-10 20:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2009-06-10 20:14 -------
(In reply to comment #2)
> The new cost model added in revision 148277 supresses prefetching in a loop
> when it is unlikely to be profitable. One such non-profitable case is a loop
> with an unknown trip count and a high prefeching cost. The prefetching cost is
> modeled by the ratio between the prefetch count and the total instruction count
> in a loop. When this ratio is greater than 1/10 in a loop with an unknown trip
> count, prefetching is considered non-profitable and no prefetches are issued.
> The first two loops in this test case fall under this category, where the trip
> count is not known and the prefetch-to-insn ratio is 1/5. Possible fixes are:
> 
> 1. Add more computation to the loop bodies in the test case to reduce the
> prefetch-to-insn ratios and hence make the loops profitable from the cost
> model's point of view.
> 2. Use a commad line option to set the maximum profitable prefetch-to-insn
> ratio to 1/5. The syntax is --param min-insn-to-prefetch-ratio=5
> 3. Change the expected output such that it does not expect prefetches in this
> case.
> 

I prefer #2 since this is a prefetch test.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2009-06-10 20:15 ` hjl dot tools at gmail dot com
@ 2009-06-12  5:00 ` hjl dot tools at gmail dot com
  2009-06-12 13:16 ` [Bug testsuite/40384] " hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-12  5:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2009-06-12 05:00 -------
Adding --param min-insn-to-prefetch-ratio=5 works.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug testsuite/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (4 preceding siblings ...)
  2009-06-12  5:00 ` hjl dot tools at gmail dot com
@ 2009-06-12 13:16 ` hjl dot tools at gmail dot com
  2009-06-12 13:24 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-12 13:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|2009-06-12 13:15:49         |2009-06-12 13:16:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug testsuite/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (5 preceding siblings ...)
  2009-06-12 13:16 ` [Bug testsuite/40384] " hjl dot tools at gmail dot com
@ 2009-06-12 13:24 ` hjl dot tools at gmail dot com
  2009-06-12 13:38 ` hjl at gcc dot gnu dot org
  2009-06-13  0:09 ` hjl dot tools at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-12 13:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2009-06-12 13:24 -------
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2009-06/msg00964.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2009-
                   |                            |06/msg00964.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug testsuite/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (6 preceding siblings ...)
  2009-06-12 13:24 ` hjl dot tools at gmail dot com
@ 2009-06-12 13:38 ` hjl at gcc dot gnu dot org
  2009-06-13  0:09 ` hjl dot tools at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-06-12 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hjl at gcc dot gnu dot org  2009-06-12 13:38 -------
Subject: Bug 40384

Author: hjl
Date: Fri Jun 12 13:37:50 2009
New Revision: 148431

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148431
Log:
2009-06-12  H.J. Lu  <hongjiu.lu@intel.com>

        PR testsuite/40384
        * gcc.dg/tree-ssa/prefetch-5.c: Add --param
min-insn-to-prefetch-ratio=5.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-5.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug testsuite/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
  2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
                   ` (7 preceding siblings ...)
  2009-06-12 13:38 ` hjl at gcc dot gnu dot org
@ 2009-06-13  0:09 ` hjl dot tools at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-13  0:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2009-06-13 00:09 -------
Fixed.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40384


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-06-13  0:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-09 10:23 [Bug middle-end/40384] New: [4.5 regression] Revision 148277 failed 148277 hjl dot tools at gmail dot com
2009-06-09 10:24 ` [Bug middle-end/40384] " hjl dot tools at gmail dot com
2009-06-09 14:19 ` [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c rguenth at gcc dot gnu dot org
2009-06-09 22:37 ` gshobaki at gcc dot gnu dot org
2009-06-10 20:15 ` hjl dot tools at gmail dot com
2009-06-12  5:00 ` hjl dot tools at gmail dot com
2009-06-12 13:16 ` [Bug testsuite/40384] " hjl dot tools at gmail dot com
2009-06-12 13:24 ` hjl dot tools at gmail dot com
2009-06-12 13:38 ` hjl at gcc dot gnu dot org
2009-06-13  0:09 ` hjl dot tools at gmail 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).