This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove -Wunsafe-loop-optimizations option (PR middle-end/86095)
- From: Richard Biener <rguenther at suse dot de>
- To: NightStrike <nightstrike at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "Bin.Cheng" <amker dot cheng at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Jun 2018 08:38:38 +0200 (CEST)
- Subject: Re: [PATCH] Remove -Wunsafe-loop-optimizations option (PR middle-end/86095)
- References: <20180615190805.GF7166@tucnak> <CAF1jjLv5uB=taooKXXNtE2diEtVpD26mz_J5g8h7i8dcFRpC7g@mail.gmail.com>
On Mon, 25 Jun 2018, NightStrike wrote:
> On Fri, Jun 15, 2018 at 3:08 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > Hi!
> >
> > As mentioned in the PR, all traces of this warning option except these
> > were removed earlier, so the warning option does nothing.
>
> This is unfortunate. As noted here:
>
> https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01057.html
>
> The warning is (or, it used to be) good at finding code areas to
> rewrite, and it's MUCH easier to use than the giant walls of text from
> -fopt-info. Is it possible to recreate this functionality in some
> other way (or has that already been done, and I missed it)?
I guess it would be straight forward to queue an optinfo record
about ->assumptions being present on loops. It's just that
passes tend to not use the more "complex" number_of_iterations_exit ()
interface but rather the overly simplistic interface giving up
in more complex situations.
-fopt-info-missed has the issue that existing passes were converted
to the opt-info dumping machinery without much thought on what
exactly is worth reporting under "missed"...
Richard.