public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os"
@ 2013-08-27 9:33 markus at trippelsdorf dot de
2013-08-28 9:28 ` [Bug gcov-profile/58250] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: markus at trippelsdorf dot de @ 2013-08-27 9:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250
Bug ID: 58250
Summary: -fprofile-use causes: "warning: -fprefetch-loop-arrays
is not supported with -Os"
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: markus at trippelsdorf dot de
Just noticed this issue during a PGO/LTO Firefox build.
During the -fprofile-use phase I always get the following warning:
warning: -fprefetch-loop-arrays is not supported with -Os [enabled by default]
This is caused by rev.193135:
/* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
if (flag_prefetch_loop_arrays < 0
&& HAVE_prefetch
- && optimize >= 3
+ && (optimize >= 3 || flag_profile_use)
&& TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
flag_prefetch_loop_arrays = 1;
Does the following patch look OK?
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 53f53fd..9955ed4 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1506,7 +1506,7 @@ process_options (void)
/* This combination of options isn't handled for i386 targets and doesn't
make much sense anyway, so don't allow it. */
- if (flag_prefetch_loop_arrays > 0 && optimize_size)
+ if (flag_prefetch_loop_arrays > 0 && optimize_size && !flag_profile_use)
{
warning (0, "-fprefetch-loop-arrays is not supported with -Os");
flag_prefetch_loop_arrays = 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/58250] -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os"
2013-08-27 9:33 [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" markus at trippelsdorf dot de
@ 2013-08-28 9:28 ` rguenth at gcc dot gnu.org
2013-08-28 9:51 ` jakub at gcc dot gnu.org
2013-09-05 19:36 ` hubicka at ucw dot cz
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-08-28 9:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #0)
> Just noticed this issue during a PGO/LTO Firefox build.
> During the -fprofile-use phase I always get the following warning:
> warning: -fprefetch-loop-arrays is not supported with -Os [enabled by
> default]
>
> This is caused by rev.193135:
> /* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
> if (flag_prefetch_loop_arrays < 0
> && HAVE_prefetch
> - && optimize >= 3
> + && (optimize >= 3 || flag_profile_use)
> && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
> flag_prefetch_loop_arrays = 1;
>
>
> Does the following patch look OK?
>
> diff --git a/gcc/toplev.c b/gcc/toplev.c
> index 53f53fd..9955ed4 100644
> --- a/gcc/toplev.c
> +++ b/gcc/toplev.c
> @@ -1506,7 +1506,7 @@ process_options (void)
>
> /* This combination of options isn't handled for i386 targets and doesn't
> make much sense anyway, so don't allow it. */
> - if (flag_prefetch_loop_arrays > 0 && optimize_size)
> + if (flag_prefetch_loop_arrays > 0 && optimize_size && !flag_profile_use)
> {
> warning (0, "-fprefetch-loop-arrays is not supported with -Os");
> flag_prefetch_loop_arrays = 0;
Hmm, I rather question this hunk - where does it come from? Why is
prefetching "unsupported" at -Os?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/58250] -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os"
2013-08-27 9:33 [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" markus at trippelsdorf dot de
2013-08-28 9:28 ` [Bug gcov-profile/58250] " rguenth at gcc dot gnu.org
@ 2013-08-28 9:51 ` jakub at gcc dot gnu.org
2013-09-05 19:36 ` hubicka at ucw dot cz
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-28 9:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Prefetching generally increases code size, so I think we shouldn't do it, at
least not by default. So I'd say for !optimize_size -fprofile-use should just
not add -fprefetch-loop-arrays.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/58250] -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os"
2013-08-27 9:33 [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" markus at trippelsdorf dot de
2013-08-28 9:28 ` [Bug gcov-profile/58250] " rguenth at gcc dot gnu.org
2013-08-28 9:51 ` jakub at gcc dot gnu.org
@ 2013-09-05 19:36 ` hubicka at ucw dot cz
2 siblings, 0 replies; 4+ messages in thread
From: hubicka at ucw dot cz @ 2013-09-05 19:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> ---
> Prefetching generally increases code size, so I think we shouldn't do it, at
> least not by default. So I'd say for !optimize_size -fprofile-use should just
> not add -fprefetch-loop-arrays.
Yep, I think -fprofile-use code should not enable code expanding optimizations
when
optimize_size. I will look into that.
Honza
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-05 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-27 9:33 [Bug gcov-profile/58250] New: -fprofile-use causes: "warning: -fprefetch-loop-arrays is not supported with -Os" markus at trippelsdorf dot de
2013-08-28 9:28 ` [Bug gcov-profile/58250] " rguenth at gcc dot gnu.org
2013-08-28 9:51 ` jakub at gcc dot gnu.org
2013-09-05 19:36 ` hubicka at ucw dot cz
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).