[LLVMdev] updated code size comparison

James Courtier-Dutton james.dutton at gmail.com
Mon May 7 09:16:03 PDT 2012


On 17 December 2009 21:53, Bill Wendling <wendling at apple.com> wrote:
> On Dec 16, 2009, at 1:26 AM, Paolo Bonzini wrote:
>
>> On 12/16/2009 03:21 AM, John Regehr wrote:
>>> Hopefully the results are more fair and useful now.  Again, feedback is
>>> appreciated.
>>
>> I would also avoid testcases using volatile.  Smaller code on these
>> testcases is often a sign of miscompilation rather than optimization.
>> For example,
>> http://embed.cs.utah.edu/embarrassing/src_harvested_dec_09/076389.c is
>> miscompiled on GCC 3.4 and SunCC 5.10.
>>
> Perhaps just leaving out those volatile tescases which are miscompiled on other platforms, since not every volatile testcase fails for all compilers. :-)
>
> -bw
>
>

Would it be possible for the test cases to detect if they have been
compiled wrongly, for example, check that volatile is actually
working?
How about running the resulting compiled code is a small virtual
machine, that is configured to return a different value each time the
volatile variable is read. The test code could then read the volatile
variable twice and return a different result depending on whether the
two read values are different or not.
If the mis-compiled code only read the value once, having wrongly
optimized out the second read, the test would fail.




More information about the llvm-dev mailing list