public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about GCC benchmarks and uninitialized variables
@ 2018-07-24  8:48 Fredrik Hederstierna
  2018-07-24  9:04 ` Alexander Monakov
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Fredrik Hederstierna @ 2018-07-24  8:48 UTC (permalink / raw)
  To: gcc

Hi

This is a general question to all you working with GCC benchmarking.

I have been working with code benchmarks like CSiBE for ARM.
From time to time unpredicted results appears where numbers gets worse by no reason.

When looking into what could cause this unpredictable behaviour, I found that there are (at least for CSiBE),
tons of code warnings that could cause unpredictable code generation like -Wuninitialized and -Wmaybe-uninitialized.
Alot of these warning indicates real bugs.

I added this issue in bugzilla,
#Bug 85880 - "Different code generation for uninitialized variables"
Though it got (correctly) rejected, since its not a bug.
But still I'm thinking how this apply to benchmarking code, and to how to approach and address this fact.

So my question is how to approach this problems when doing benchmarking,
ofcourse we want the benchmark to mirror as near as 'real life' code as possible.
But if code contains real bugs, and issues that could cause unpredictable code generation, should such code be banned from benchmarking, since results might be misleading? On the other hand, the compiler should generate best code for any input?

What do you think, should benchmarking code not being allowed to have eg warnings like
-Wuninitialized and maybe -Wmaybe-uninitialized?
Are there more warnings that indicate unpredictable code generations due to bad code, or are the root cause that these are 'bugs', and we should not allow real bugs at all in benchmarking code?

I've read some about uninitialized variable issues also at this link which was interesting, its a wider discussion, and ofcourse a very hard problem to solve.
https://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

Thanks, Best Regards,
Fredrik

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-07-09 19:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24  8:48 Question about GCC benchmarks and uninitialized variables Fredrik Hederstierna
2018-07-24  9:04 ` Alexander Monakov
2018-07-24 12:17 ` David Brown
2019-05-30  9:13 ` Question about GCC not warning for some noncompliant SEI CERT C code examples Fredrik Hederstierna
2019-05-30 14:28   ` Martin Sebor
2019-05-30 14:48     ` Jeff Law
2019-06-01 23:35   ` ARM peephole2 from 2003 never merged, still valid Fredrik Hederstierna
2019-06-01 23:41     ` Fredrik Hederstierna
2019-06-02 12:28       ` Segher Boessenkool
2019-06-05 23:03         ` Jeff Law
2019-06-05 23:46           ` Segher Boessenkool
2019-06-06  9:13             ` Richard Earnshaw (lists)
2019-06-06 14:02               ` Segher Boessenkool
2019-06-06 14:55                 ` Fredrik Hederstierna
2019-06-06 16:06                   ` Richard Earnshaw (lists)
2019-06-06 16:49                     ` Segher Boessenkool
2019-07-08  6:41                       ` Fredrik Hederstierna
2019-07-09 19:13                         ` Jeff Law
2019-06-14 20:30                     ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).