Go to file
Chandler Carruth f59a838720 [PM/LCG] Teach the LazyCallGraph to maintain reference edges from every
function to every defined function known to LLVM as a library function.

LLVM can introduce calls to these functions either by replacing other
library calls or by recognizing patterns (such as memset_pattern or
vector math patterns) and replacing those with calls. When these library
functions are actually defined in the module, we need to have reference
edges to them initially so that we visit them during the CGSCC walk in
the right order and can effectively rebuild the call graph afterward.

This was discovered when building code with Fortify enabled as that is
a common case of both inline definitions of library calls and
simplifications of code into calling them.

This can in extreme cases of LTO-ing with libc introduce *many* more
reference edges. I discussed a bunch of different options with folks but
all of them are unsatisfying. They either make the graph operations
substantially more complex even when there are *no* defined libfuncs, or
they introduce some other complexity into the callgraph. So this patch
goes with the simplest possible solution of actual synthetic reference
edges. If this proves to be a memory problem, I'm happy to implement one
of the clever techniques to save memory here.

llvm-svn: 308088
2017-07-15 08:08:19 +00:00
clang clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067) 2017-07-15 06:14:47 +00:00
clang-tools-extra ClangApplyReplacementsTests: Add clangBasic in libdeps. 2017-07-15 06:32:10 +00:00
compiler-rt [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so 2017-07-15 00:30:46 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc generic: add missing get_work_dim include 2017-06-02 15:58:35 +00:00
libcxx [libc++] Clean up cl warning 4231 disabling 2017-07-14 03:56:54 +00:00
libcxxabi [demangler] Respect try_to_parse_template_args 2017-07-13 19:37:37 +00:00
libunwind [libunwind][CMake] Add install path variable to allow overriding the destination 2017-07-11 01:12:09 +00:00
lld Avoid using OutputSections::Sections. 2017-07-14 22:26:16 +00:00
lldb Fix debugserver accepting remote connections 2017-07-13 20:58:13 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [PM/LCG] Teach the LazyCallGraph to maintain reference edges from every 2017-07-15 08:08:19 +00:00
openmp [GOMP] Fix (un)tied tasks with the GCC 2017-07-13 10:38:11 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly update isl to: isl-0.18-791-ga22eb92 2017-07-14 10:36:00 +00:00