[LLVMdev] Deleting unused C++ code
oyvind.harboe at zylin.com
Sun Jul 3 22:42:22 PDT 2011
On Sun, Jul 3, 2011 at 10:34 PM, Reid Kleckner <reid.kleckner at gmail.com> wrote:
> An easier way would be to use a coverage tool like gcov to see what's
> actually *used* when the app is run normally. Then you can ask the
> question, what percentage of all lines of code are dead?
We need something that can do this using static analysis... Otherwise
we can just use Eclipse and search for reference as a first approximation
and try a rebuild. Tedious process. gcov is out of question we'd have
to execute the entire program, which is a non-starter.
That said, it would be interesting to add gcov to the testsuite to get a measure
of how many percent of the application we're exercising....
> A static analysis will not be able to see through things like virtual
> method calls.
Not even in theory?
Øyvind Harboe - Can Zylin Consulting help on your project?
US toll free 1-866-980-3434 / International +47 51 87 40 27
More information about the llvm-dev