[LLVMdev] Testing backend
John Criswell
criswell at cs.uiuc.edu
Wed Jun 9 09:22:01 PDT 2004
Reid Spencer wrote:
> Vladimir,
>
> The makefile for the feature tests is in the directory above. Simply:
>
> cd ~/llvm/test
> make Feature.t
>
> This works for the regression tests to:
>
> make Regression.t
>
> The tests are run QMTest which just "knows" what to do with the test
> file. In many cases there is a RUN: line which instructs the test
> harness how to run the test.
The QMTest tests are generally small LLVM code snippets that we
manipulate and then examine for correctness. You can add your own tests
to llvm/test/Regression/CodeGen/<platform> if you want to write small,
articifical test cases where you know what to check for. For example,
see llvm/test/Regression/CodeGen/X86/2004-02-12-Memcpy.llx.
QMTest tests are not full programs, so the code is never executed and
tested for correctness.
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.
FYI, we use QMTest 2.0.3. The "Getting Started Guide"
(http://llvm.cs.uiuc.edu/docs/GettingStarted.html) should have
instructions on how to get the older version. You may also want to read
the Test Suite Guide (http://llvm.cs.uiuc.edu/docs/TestingGuide.html).
-- John T.
>
> On Wed, 2004-06-09 at 05:18, Vladimir Prus wrote:
>
>>I've finally managed to bring my backend to a minimally working form. I can
>>compile three small examples with arithmetic operations, branches and phi
>>operations. However, there surely is a lot of omissions and bugs.
>>
>>How do I test a backend. For obvious reasons, I'd prefer a number of really
>>small tests, to make debugging easier. I see some number of such small tests
>>in "test/Feature" directory, but there's no Makefile, so I don't know how
>>they are run, and most of the tests don't even have "main" function, so I
>>don't know if they are supposed to be run. Any suggestions?
>>
>>- Volodya
>>
>>_______________________________________________
>>LLVM Developers mailing list
>>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>http://mail.cs.uiuc.edu/mailman/listinfo/llvmde
>
> v
--
*********************************************************************
* John T. Criswell Email: criswell at uiuc.edu *
* Research Programmer *
* University of Illinois at Urbana-Champaign *
* *
* "It's today!" said Piglet. "My favorite day," said Pooh. *
*********************************************************************
More information about the llvm-dev
mailing list