[PATCH] D49434: Put "built-in" function definitions in global Used list, for LTO. (fix bug 34169)

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 09:38:24 PDT 2018


echristo added a comment.

In https://reviews.llvm.org/D49434#1165381, @pcc wrote:

> I don't think that globalopt is the right place for this because there is no guarantee that the pass is run. If we wanted to do something about this, it seems like a better place would be in `lib/Analysis/ModuleSummaryAnalysis.cpp` where we decide which functions are GC roots.
>
> Also this is only a subset of the functions that the code generator can generate calls to. There is a list of runtime functions in `llvm/include/llvm/CodeGen/RuntimeLibcalls.def`, but as far as I know it isn't 100% comprehensive. Using that list would probably be better than just 3 functions though.


FWIW I agree. Having a more central place that these functions are gotten will help avoid a "just this function, and this one" set of patches in the future.


https://reviews.llvm.org/D49434





More information about the llvm-commits mailing list