This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 0/9] Separate shrink-wrapping


On 08/26/2016 03:48 PM, David Malcolm wrote:
I'm nervous about the build_random_cfg function: randomness in
selftests seems like a double-edged sword.  On the one hand, we can use
it to fuzz-test an optimization to rapidly gain a lot of coverage.  On
the other hand, does every host generate the same sequence of values?
Presumably we want everyone to be effectively running the same
selftests.

I intended to put a srandom call in there at the start but forgot. One could argue that there's value in having different tests on different hosts, as long as they are stable between runs, but...

Maybe there's a need for some kind of selftest::rng class here?

That might be a good idea too.

On a unrelated note, should the various vfunc implementations be marked
with "FINAL OVERRIDE" (from coretypes.h), so that the compiler has a
better chance of devirtualizing them in a release build?

Wasn't aware of that - will have a look.

Maybe we could also use a long-running "-fselftest=extensive" for stress-testing algorithms such as this (increasing the number of random cfgs it tries)?


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]