[LLVMdev] Removing unused function definitions

Duncan Sands baldrick at free.fr
Sat Mar 20 04:35:57 PDT 2010


Hi Mattias,

> I wonder if there is a pass in opt that removes unused function
> definitions. I'm working on a llvm based compiler backend and when I
> link the generated bc files with the runtime system and the standard
> library, all functions from the standard library are in the linked bc
> file, even unused ones. I've tried some different passes in "opt" but
> the definitions are still there.

try running the -internalize pass first.

Ciao,

Duncan.



More information about the llvm-dev mailing list