[LLVMdev] To test an LLVM pass
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Jun 26 14:27:00 PDT 2014
> On 2014-Jun-26, at 05:07, Rekha R <rekharamapai at nitc.ac.in> wrote:
>
> Hi,
>
> I wrote a pass in LLVM and would like to test it on the programs in LLVM test-suite. To be specific, I would like to get the stats upon running my pass on these programs.
>
> What are the commands to run my pass on the test suite?
The test-suite [1][2] runs clang. If you have an LLVM command-line flag to enable your
pass, you can use `-mllvm -your-flag` to pass your flag through clang.
There is some quickstart documentation on running LNT [3]. Have a look at the `--help`
for the `runtest` command to see how to customize which flags are passed down to clang
invocations.
Hope that helps!
[1]: http://llvm.org/docs/lnt/intro.html
[2]: http://llvm.org/docs/lnt/tests.html#lnt-based-nt-test-modules
[3]: http://llvm.org/docs/lnt/quickstart.html
-- dpnes
More information about the llvm-dev
mailing list