shreyas krishnan wrote:> Hi
> I am wondering if there is way to eliminate functions that are not
> used after two files have been linked. Can the optimizer do it ? Or is
> there a way you can have it done while linking it self ?
>
I think there's an LLVM optimization to do this; however, it should only
delete functions with internal linkage. Functions with external linkage
could be referenced and used by code that is linked in later.
The -internalize pass will change external functions to have internal
linkage, enabling this optimization.
-- John T.
> thanks for answers
> shrey
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>