LLVM test a pass

Hi,

I'm currently developping a pass for LLVM and I was wondering what's the best way to test if it work correctly.

Right now to test my pass, I'm compiling libtomcrypt with LLVM and an other time LLVM+my pass. After that I run the test framework of libtomcrypt
and compare the result.

Is there a best way to do that? Maybe using the test suite from LLVM is better (I tought it used some "very" particular piece of code to see if LLVM does it's job)?

Thx
Cheers

Hi,

I'm currently developping a pass for LLVM and I was wondering what's the best way to test if it work correctly.

Right now to test my pass, I'm compiling libtomcrypt with LLVM and an other time LLVM+my pass. After that I run the test framework of libtomcrypt
and compare the result.

Is there a best way to do that? Maybe using the test suite from LLVM is better (I tought it used some "very" particular piece of code to see if LLVM does it's job)?

When testing a pass, you want to expose it to as many programs as possible. The LLVM test-suite would be a good place to find programs to test. You may also want to try doing a "make world" on FreeBSD with your pass or trying out commonly used GNU programs (like GNU zip, GNU tar, flex, make, bison, GCC, etc.). You could even test your pass on LLVM itself.

If you want to go for big applications, test Apache, MySQL, Firefox, and Thunderbird.

-- John T.

Hi,

The LLVM has a good test suite. I recommend it. You can test your pass
with single-source programs and multi-source programs. You can also
configure the test-suite to run your test with external benchmarks
within the LLVM test suite.

You can also run some programs after you use your pass, to verify if
your pass don't affect the behavior of the compiled program. You can
do it with the test suite, too. You just have to put the instructions
to run the compiled program in the Makefile of your test.

Regards,

Raphael Ernani

Thx to you both...

Cheers