[LLVMdev] -debug in make check
David Blaikie
dblaikie at gmail.com
Mon Aug 20 17:37:06 PDT 2012
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)
More information about the llvm-dev
mailing list