[LLVMdev] updated code size comparison

John Regehr regehr at cs.utah.edu
Wed Jan 20 12:10:02 PST 2010


Hi Torok-

> Could you also add a main() for each of these files, and do
> a very simple test that the optimized functions actually work?

Unfortunately, testing isolated C functions is much harder than just 
passing them random data!

Consider this function:

   int foo (int x, int y) { return x+y; }

The behavior of foo() is undefined when x+y overflows.  If course it is 
trivial to come up with similar examples based on shifts, multiplies and 
divides, etc.

A potential solution is "under-constrained execution":

   http://www.stanford.edu/~engler/issta07v-engler.pdf

I will bug Dawson and Daniel and see if I can get ahold of some code for 
this.

John



More information about the llvm-dev mailing list