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
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. 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/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040609/d163812e/attachment.sig>
Hi Reid,> 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.tThanks,> 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.In fact, I've already tried to run the tests with QMTest, bypassing Makefiles, but I get numerous error in QMTest/llvmdb.py. It appears the file was written against older version of QMTest (I have 2.1.2 here). I've made some attempt to port to current QMTest, but haven't finished yet. What QMTest version do you use? - Volodya
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. * *********************************************************************