[LLVMdev] Pass to remove unused functions
Micah.Villmow at amd.com
Tue May 5 16:07:38 PDT 2009
I thought this pass would do it, but when I run it over my bc file the
output file is the same as the input file.
The issue I guess is a little different. When I link in the huge bc
file with the tiny bc file, I only want the resulting bc file to have
the function definitions that the tiny bc file requires and not every
function in the huge bc file.
Any idea's how to do this with the current llvm toolset?
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On Behalf Of Chris Lattner
Sent: Tuesday, May 05, 2009 3:53 PM
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Pass to remove unused functions
On May 5, 2009, at 3:48 PM, Villmow, Micah wrote:
In order to handle a large vector based math library I link in a fairly
large bitcode file that might or might not be needed. The problem is
that linking in this bitcode file drastically increases the amount of
compile time required. Is there a way to remove all functions that are
not used after this linking pass? Something similar to die but removes
functions from the compilation unit instead of instructions.
The -globaldce pass will remove dead internal globals and functions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev