This is the mail archive of the
mailing list for the GCC project.
Enable array prefetching also with -fprofile-use
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Fri, 2 Jul 2010 15:00:12 +0200
- Subject: Enable array prefetching also with -fprofile-use
with -fprofile-use the prefetching should not be risky since we have idea about
what loops are hot and what are their average number of iterations. So I think
we ought to enable the pass as we do with -O3.
If there will not be complains, I will commit the following tonight.
* config/i386/i386.c (override_options): Enable prefetching also with
--- config/i386/i386.c (revision 161690)
+++ config/i386/i386.c (working copy)
@@ -3558,7 +3558,7 @@ override_options (bool main_args_p)
/* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
if (flag_prefetch_loop_arrays < 0
- && optimize >= 3
+ && (optimize >= 3 || flag_profile_use)
&& software_prefetching_beneficial_p ())
flag_prefetch_loop_arrays = 1;