[LLVMdev] How can I know which functions aren't used within one module?

Chris Lattner clattner at apple.com
Thu Sep 2 16:25:41 PDT 2010


On Sep 2, 2010, at 1:54 AM, Duncan Sands wrote:

> Hi Yuri,
> 
>> Every value used in .ll file normally has '#uses='  printed next to it.
>> But functions don't have this.
> 
> I've added this.

I just removed it :)

In retrospect, having #uses come out of the asmprinter by default was a "bad thing", because it is just clutter and doesn't add much useful value.  It is better to have people interested in this opt into it.

Instead of being on by default, I reimplemented it as part of the llvm-dis tool.  To get #uses info (including for functions) you can now run a .bc file through "llvm-dis -show-annotations".

-Chris



More information about the llvm-dev mailing list