[LLVMdev] Deleting unused C++ code

Reid Kleckner reid.kleckner at gmail.com
Sun Jul 3 13:34:12 PDT 2011

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?

A static analysis will not be able to see through things like virtual
method calls.


On Sun, Jul 3, 2011 at 3:07 PM, Øyvind Harboe <oyvind.harboe at zylin.com> wrote:
> Can llvm generate warnings for unused C++ code using global
> analysis?
> If I could use llvm to figure out what code I can delete in a 20
> year old app with millions of lines of code, this alone would defend
> spending time on making the app build with llvm, even if we don't
> actually run the code generated...
> --
> Øyvind Harboe - Can Zylin Consulting help on your project?
> US toll free 1-866-980-3434 / International +47 51 87 40 27
> http://www.zylin.com/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list