[LLVMdev] Testing backend
Chris Lattner
sabre at nondot.org
Wed Jun 9 12:04:04 PDT 2004
On Wed, 9 Jun 2004, John Criswell wrote:
> If you want simple C programs to compile and test with your code
> generator, I'd recommend the tests in llvm/test/Programs/SingleSource.
> The tests in llvm/test/Programs are all complete programs that can be
> compiled and executed. You can use them to compare your code generator
> results with that of the native compiler.
As John mentioned, the test/Programs/SingleSource directory is the place
to start. I would recommend looking at .../Regressions/C .../UnitTests
and .../Benchmarks/Shootout. When stuff is basically sorta working, you
can move up to the "big" ones like Benchmarks/Dhyrstone :)
Also, one of the really nice things of the test/Programs hierarchy is that
it has a lot of debugging functionality built in. In particular, if a
program (say test/Programs/SingleSource/UnitTests/2003-05-31-CastToBool.c)
crashes or miscompiles with your code generator, you can go into that
directory and say:
make Output/2003-05-31-CastToBool.bugpoint-llc
... and bugpoint will autoreduce the testcase down to something that is
hopefully trivially small for you to work with.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list