This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
- From: "gshobaki at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2009 22:37:13 -0000
- Subject: [Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c
- References: <bug-40384-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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