[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] c++ features


Atomic is available in C1X.

Yes, my motivation is that I've talked to multiple C++ compiler
developers lately and basically everyone is worried about how the new
memory model interacts with their optimizer. It's safe to say they'll be
flushing out subtle bugs for several years, but we could accelerate that

That would be useful.

What about inline? You will probably need to look at what kinds of
functions get inlined. There is lots of stuff you could stress,
eg, simplification when arguments are literal, optimization
opportunities in different calling contexts and stack handling
for different amounts of local storage.

Generating inline directive is a great idea, and (like "register") it's
totally free at generation time.

The clever bit with inline testing is having all sorts of dependencies
between the call site and the potentially inlined function that
should/should not effect the behavior of the code.

Talking of dependencies, whole program optimization is now available
in a number of production compilers.  Perhaps you could also look at
splitting generated code up into multiple files that can be separately
compiled, to check that the behavior remains the same when whole
program optimization is used.

Derek M. Jones                  tel: +44 (0) 1252 520 667
Knowledge Software Ltd          blog:shape-of-code.coding-guidelines.com
Source code analysis            http://www.knosof.co.uk