[LLVMdev] speed and code size issues

John Regehr regehr at cs.utah.edu
Sat Jul 18 12:57:37 PDT 2009


Hi Nuno,

The "right answer" for each function for a given input is determined by 
voting; any compiler whose output diagrees with the majority is considered 
to be wrong.  So far, there is always a majority that agree on the answer.

Rather than testing, I'd like to use an equivalence checker for object 
code.  We're working on borrowing one, but don't have anything yet. 
Equivalence checkers for object code are still very much at the research 
stage, it seems.  Luckily, for this particular purpose the checker does 
not need to scale to large inputs.

Generating the tests is really easy: DFS with bounded depth over a grammar 
for a C subset.  Then it takes a bit of effort to prune stupid programs, 
such as those that attempt to shift by <0 or >=bitwidth.

> In summary, do you have any paper coming along? :)

We intend to write one but I'm waiting to see what aspects of this turn 
out to be interesting or useful!  Really this is just an offshoot from our 
random testing work where DFS provides an alternative way to drive the 
program generator.

John Regehr



More information about the llvm-dev mailing list