[LLVMdev] module passes that eliminate unused global symbols
Frank Winter
fwinter at jlab.org
Mon May 20 13:20:25 PDT 2013
My module contains one function that calls a handful of functions in
another module (which contains a huge collection of functions). The goal
is to make the module 'self-contained', i.e. no calls across module
boundaries, and as minimal as possible, i.e. it does not contain any
function which is not called directly or indirectly from the original
function. So, I linked in the callee module to the caller module and ran
the internalize pass to filter/mark the non-external global symbols. Is
this a good first step towards the goal? How can I eliminate unused
global symbols or make the module minimal (with the existing (trunk)
passes)? Ideally only the (directly or indirectly) referenced symbols
survive. Is this possible or do I need to develop such passes?
Frank
More information about the llvm-dev
mailing list