[PATCH] D45180: libcalls must check for "RtLibUseGOT" metadata during simplification

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 18:52:56 PDT 2018


efriedma added a comment.

I don't think we want to try to copy attributes from fprintf() to fputs()... I mean, I can't see when it would make sense to copy anything.  fprintf() and fputs() aren't really related except for the fact that we expect them both to be defined in libc, and they can both be used to perform certain equivalent operations.  And any attribute which needs to be applied to all calls into libc needs to be computed differently anyway: the compiler can generate calls to libc in a translation unit which doesn't contain any explicit calls to libc functions. (llvm.sin() gets lowered to sin(), byval struct copies get lowered to memcpy(), etc.)  Making this work consistently is precisely the reason we have RtLibUseGOT in the first place.


https://reviews.llvm.org/D45180





More information about the llvm-commits mailing list