I'd like to have some .ll tests in make check where I verify that certain DAG nodes are being processed. Normally I would compile with -debug and look for them. Is it possible to scan the stdout instead of the .s file from a .ll in make check? Probably I would want to process the file twice, once to verify that the nodes occur in the dag and then to look for some patterns in the .s file.
On Mon, Aug 20, 2012 at 4:42 PM, reed kotler <rkotler at mips.com> wrote:> I'd like to have some .ll tests in make check where I verify that > certain DAG nodes are being processed. Normally I would compile with > -debug and look for them. > > Is it possible to scan the stdout instead of the .s file from a .ll in > make check?Sure - many tests simply run a command and pipe the output directly to FileCheck. This seems like it would do what you want.> Probably I would want to process the file twice, once to verify that the > nodes occur in the dag and then to look for some patterns in the .s file.Something like: ; RUN: llc -debug %s -o %t.s | FileCheck %s ; RUN: FileCheck %s < %t.s There are some existing examples that seem to use -debug-pass=foo for some checking (you can find them with: grep -r "\-debug" llvm/test)
Hi Reed,> I'd like to have some .ll tests in make check where I verify that > certain DAG nodes are being processed. Normally I would compile with > -debug and look for them. > > Is it possible to scan the stdout instead of the .s file from a .ll in > make check?while it is possible, my understanding is that the output of -debug is not supposed to be stable, may change at any time, and shouldn't really be checked by tests. Ciao, Duncan.
I'm just looking for dag node types for the most part. So a really small test that has a "seteq" node. The string 'seteq' will probably always be in the debug output. Some of these are tiny unit tests and I need to check that llvm has not transformed the dag into something equivalent that does not use the node I am trying to test for. On 08/21/2012 12:23 AM, Duncan Sands wrote:> Hi Reed, > >> I'd like to have some .ll tests in make check where I verify that >> certain DAG nodes are being processed. Normally I would compile with >> -debug and look for them. >> >> Is it possible to scan the stdout instead of the .s file from a .ll in >> make check? > while it is possible, my understanding is that the output of -debug is not > supposed to be stable, may change at any time, and shouldn't really be checked > by tests. > > Ciao, Duncan. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev