Testing an LLVM pass

Hi all,

I’m currently writing an LLVM function pass and I want to know how can I test it?

Currently, I try to compile some crypto library and check if the test suite are working but I don’t think this is very efficient.

Does anyone has a leads?

Greetings,

Johan

Hi there,

what we do here at Quarkslab is a combination of:

- unittesting the pass (through lit)
- fuzzing the passes (through csmith & through various optimization flag
  combination)
- running the test suite of various open source project compiled with
  our pass activated (as you do)

hope it helps,

serge

For testing your pass, you might want to have a look at the tutorial presented by Serge (and Adrien) at the US dev meeting:
http://www.llvm.org/devmtg/2015-10/slides/GueltonGuinet-BuildingTestingDebuggingASimpleOutOfTreePass.pdf

Cheers,

Hi all,

Thank you for the answers, I will check that.

Greetings,

Johan