[LLVMdev] Pass to remove unused functions

Chris Lattner clattner at apple.com
Tue May 5 22:17:03 PDT 2009


On May 5, 2009, at 9:34 PM, Jeffrey Yasskin wrote:

>> "static".  However, if you do that, they won't make it into the bc  
>> file.
>> -Chris
>
> A flag to force them into the .bc file would be a nice feature for
> clang. Unfortunately, I don't expect it to be urgent enough for me to
> submit a patch any time soon.

You can get that by marking them attribute(used), but then globaldce  
won't strip them.  Perhaps the best option is to use the internalize  
pass, which marks a set of functions internal.

-Chris



More information about the llvm-dev mailing list