On Mon, Mar 28, 2022 at 03:26:11PM +0200, Richard Biener wrote:
> On Mon, 28 Mar 2022, Jakub Jelinek wrote:
> 
> > On Mon, Mar 28, 2022 at 03:16:24PM +0200, Richard Biener wrote:
> > > When doing format diagnostics at -O0 we should make sure to make
> > > SCEV available to avoid false positives due to ranges we otherwise
> > > can trivially compute.
> > > 
> > > Bootstrap and regtest running on x86_64-unknown-linux-gnu.
> > > 
> > > OK if that succeeds?
> > 
> > Doesn't this slow down -O0 compilation too much?
> 
> Not if you do not enable the warning.  If you enable it you
> probably are set to pay for it.  Are you specifically
> concerned about the cases where SCEV / niter analysis take
> a lot of time or are you concerned about the constant overhead
> of enabling loops/SCEV?

I was just worried about the worst case compile time for -O0.
I think we already have tons of -fcompare-debug=-Wall (or -Wextra)
dependent code generation (mainly in the C++ FE) so until we are able to
deal with it making this -W* dependent isn't the end of the world.

Guess the patch is ok.  If we find bad compile time issues with it,
one way would be to enable it lazily (don't enable it initially,
when about to emit first warning instead enable it and retry).

        Jakub

Reply via email to