This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2][LTO/PGO] Warn when both -flto and -fprofile-generate are enabled
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: Marek Polacek <polacek at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 02 Apr 2014 14:10:49 +0200
- Subject: Re: [PATCHv2][LTO/PGO] Warn when both -flto and -fprofile-generate are enabled
- Authentication-results: sourceware.org; auth=none
- References: <20140402115031 dot GA23632 at x4> <20140402115642 dot GC24603 at redhat dot com> <20140402120203 dot GA280 at x4>
Markus Trippelsdorf <markus@trippelsdorf.de> writes:
> diff --git a/gcc/opts.c b/gcc/opts.c
> index fdc903f9271a..581d2e948483 100644
> --- a/gcc/opts.c
> +++ b/gcc/opts.c
> @@ -833,6 +833,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
> error_at (loc, "only one -flto-partition value can be specified");
> }
>
> + if (opts->x_flag_generate_lto && opts->x_flag_profile_generate)
> + warning_at (loc, 0, "enabling both -fprofile-generate and -flto is a bad idea");
This warning is not very helpful in this form. Rather say something
like `causes excessive memory consumption' if this is the problem.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University