This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/40384] [4.5 regression] Revision 148277 failed gcc.dg/tree-ssa/prefetch-5.c



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]