Re: How stable is the CFG and basic block IDs?

2024-04-30 Thread Jørgen Kvalsvik
On 30/04/2024 13:43, Jan Hubicka wrote: The problem is testing. If gcc would re-number the basic blocks then tests comparing hard-coded test paths would break, even though the path coverage itself would be just fine (and presumably the change to the basic block indices), which would add an unreas

Re: How stable is the CFG and basic block IDs?

2024-04-30 Thread Jørgen Kvalsvik
On 30/04/2024 13:43, Jan Hubicka wrote: The problem is testing. If gcc would re-number the basic blocks then tests comparing hard-coded test paths would break, even though the path coverage itself would be just fine (and presumably the change to the basic block indices), which would add an unreas

Re: How stable is the CFG and basic block IDs?

2024-04-30 Thread Jørgen Kvalsvik
On 30/04/2024 12:45, Richard Biener wrote: On Tue, Apr 30, 2024 at 11:45 AM Jørgen Kvalsvik wrote: Hi, I am working on adding path coverage support to gcc/gcov and need to develop a good testing strategy. So far I can reasonably well report on the uncovered path as such: paths covered 6 of

How stable is the CFG and basic block IDs?

2024-04-30 Thread Jørgen Kvalsvik
Hi, I am working on adding path coverage support to gcc/gcov and need to develop a good testing strategy. So far I can reasonably well report on the uncovered path as such: paths covered 6 of 17 path not covered: 2 8 3 4 path not covered: 2 8 3 5 6 path not covered: 2 8 3 5 7 10 ... where th

Re: Surprising CFG construction with goto from then to else

2022-10-03 Thread Jørgen Kvalsvik
On 9/8/22 12:30, Jørgen Kvalsvik wrote: On 02/09/2022 14:22, Richard Biener wrote: On Fri, Sep 2, 2022 at 11:50 AM Jørgen Kvalsvik wrote: Hello, I played some more with odd programs and the effect on control flow graph construction (as a part of condition coverage support [1]) and came

Re: Surprising CFG construction with goto from then to else

2022-09-16 Thread Jørgen Kvalsvik
Gentle ping. Any idea if the edge split is still useful and/or how to test for it? Thanks, Jørgen On 08/09/2022 12:30, Jørgen Kvalsvik wrote: On 02/09/2022 14:22, Richard Biener wrote: On Fri, Sep 2, 2022 at 11:50 AM Jørgen Kvalsvik wrote: Hello, I played some more with odd programs and

Re: Surprising CFG construction with goto from then to else

2022-09-08 Thread Jørgen Kvalsvik
On 02/09/2022 14:22, Richard Biener wrote: On Fri, Sep 2, 2022 at 11:50 AM Jørgen Kvalsvik wrote: Hello, I played some more with odd programs and the effect on control flow graph construction (as a part of condition coverage support [1]) and came across this: int fn (int a, int b, int c

Surprising CFG construction with goto from then to else

2022-09-02 Thread Jørgen Kvalsvik
Hello, I played some more with odd programs and the effect on control flow graph construction (as a part of condition coverage support [1]) and came across this: int fn (int a, int b, int c) { int x = 0; if (a && b) { if (c) { goto a_; } else {

Re: [PATCH] gcov: fix file and function summary information

2022-08-24 Thread Jørgen Kvalsvik
mmary. (accumulate_line_counts): Similarly for files. Co-Authored-By: Jørgen Kvalsvik --- gcc/gcov.cc | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/gcov.cc b/gcc/gcov.cc index 27be5ff0911..9cf1071166f 100644 --- a/gcc/gcov.cc +++ b/gcc/gcov.cc @@ -2694,6 +26

Should templates with multiple instantiations contribute to summaries in gcov?

2022-08-03 Thread Jørgen Kvalsvik
I have this program: #include template T add (T x, T y) { if (x > y) return x + y; else return x; } template T sub (T x, T y) { if (x > y) return x - y; else return x; } int main() { int i1 = 10; int i2 = 12; double d1 = 10.0;