Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-18 Thread Martin Liška
On 05/18/2018 04:07 PM, Rainer Orth wrote: Please fix. Thanks for the report, will install obvious fix. Martin >From af8fbed777a1583fc2ac865e0e15cbb24fee6a81 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 18 May 2018 16:27:22 +0200 Subject: [PATCH] Fix typo in test-case. gcc/testsuite/Chan

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-18 Thread Rainer Orth
Hi Martin, > On 05/16/2018 03:39 PM, Alexander Monakov wrote: >> On Wed, 16 May 2018, Martin Liška wrote: Hm, is the off-by-one in the new explanatory text really intended? I think the previous text was accurate, and the new text should say "9th and 10th" and then "first 10 invocati

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-17 Thread Richard Biener
On Wed, May 16, 2018 at 3:54 PM Martin Liška wrote: > On 05/16/2018 03:39 PM, Alexander Monakov wrote: > > On Wed, 16 May 2018, Martin Liška wrote: > >>> Hm, is the off-by-one in the new explanatory text really intended? I think > >>> the previous text was accurate, and the new text should say "9

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Martin Liška
; intention. It should be the > other way around: > > return v > limit_low[index] && v <= limit_high[index]; Note that I changed count[index]++ to happen after dbg_cnt_is_enabled. I'm reverting that and now it works fine with your condition. Martin > >

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Alexander Monakov
On Wed, 16 May 2018, Martin Liška wrote: > > Hm, is the off-by-one in the new explanatory text really intended? I think > > the previous text was accurate, and the new text should say "9th and 10th" > > and then "first 10 invocations", unless I'm missing something? > > I've reconsidered that once

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Martin Liška
the new text should say "9th and 10th" > and then "first 10 invocations", unless I'm missing something? I've reconsidered that once more time and having zero-based values: * -fdbg-cnt=event:N - trigger event N-times * -fdbg-cnt=event:N:(N+M) - skip even N-times and

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Alexander Monakov
On Wed, 16 May 2018, Martin Liška wrote: > > I recall Jakub recently applied a tree-wide change of A < B && B < C to read > > B > A && B < C. > > Can you please point to a revision where it was done? It is SVN r255831, mailing list thread here ("Replace Yoda conditions"): https://gcc.gnu.org/ml/g

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Martin Liška
pper bound of @code{UINT_MAX}; >> thus @code{dbg_cnt} returns true always unless the upper bound >> is set by this option. >> -For example, with @option{-fdbg-cnt=dce:10,tail_call:0}, >> +For example, with @option{-fdbg-cnt=dce:9:10,tail_call:0}, >> @code{dbg_cnt(dce

Re: [PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Alexander Monakov
On Wed, 16 May 2018, Martin Liška wrote: > Hi. > > I consider it handy sometimes to trigger just a single invocation of > an optimization driven by a debug counter. Doing that one needs to > be able to limit both lower and upper limit of a counter. It's implemented > in the patch. I'd like to of

[PATCH] Support lower and upper limit for -fdbg-cnt flag.

2018-05-16 Thread Martin Liška
Hi. I consider it handy sometimes to trigger just a single invocation of an optimization driven by a debug counter. Doing that one needs to be able to limit both lower and upper limit of a counter. It's implemented in the patch. Patch can bootstrap on x86_64-linux-gnu and survives regression test