[LLVMdev] Simple question on C program test coverage / dependence analysis

Sai Zhang racezhang at gmail.com
Wed Nov 23 10:15:08 PST 2011


Hi all.

I am new to LLVM, and wondering are there any off-the-shelf tools for C
programs
for measuring testing coverage and simple dependence analysis (within the
LLVM framework).

Specifically, I would like to:

(1)  measure which line is covered when executing a C program with specific
input values.

     It likes a testing coverage tool, but I hope to get the line number.
are there off-the-shelf
     tool (or LLVM extension) to do that?


(2) find control/data dependence between each statement

    For example, given the following program:

1.    if(x) {
2.       f();
3.    }
4.    a = 1;
5.    b = a;


Line 2 is control-dependent on line 1, and line 5 is data-dependent on line
4 (with variable a)

I hope a tool can report this potential dependence information. It does not
need to very
precise for alias (pointers).  A conservative treatment should be fine.

I am also wondering is there an off-the-shelf tool can report such
potential dependence?


Thanks a lot, any suggestion is highly appreciated.


-Sai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111123/ea0ce645/attachment.html>


More information about the llvm-dev mailing list