[PATCH] D25965: Utility functions for appending to llvm.used/llvm.compiler.used
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 14:52:44 PDT 2016
pcc added inline comments.
Comment at: lib/LTO/UpdateCompilerUsed.cpp:55
SmallPtrSetImpl<const GlobalValue *> &LLVMUsed;
> pcc wrote:
> > This could also be a std::vector, then there'd be no need to rebuild it.
> How do you prevent duplicate?
findLibCallsAndAsm is the only function that adds globals to LLVMUsed. The only call sites are in findInModule which cannot pass duplicates. We can easily change findLibCallsAndAsm to add the global at most once.
More information about the llvm-commits