llvm-project/llvm
Johannes Doerfert 1b34b84ddd [CallGraphUpdater] Update the ExternalCallingNode for node replacements
Summary:
While it is uncommon that the ExternalCallingNode needs to be updated,
it can happen. It is uncommon because most functions listed as callees
have external linkage, modifying them is usually not allowed. That said,
there are also internal functions that have, or better had, their
"address taken" at construction time. We conservatively assume various
uses cause the address "to be taken". Furthermore, the user might have
become dead at some point. As a consequence, transformations, e.g., the
Attributor, might be able to replace a function that is listed
as callee of the ExternalCallingNode.

Since there is no function corresponding to the ExternalCallingNode, we
did just remove the node from the callee list if we replaced it (so
far). Now it would be preferable to replace it if needed and remove it
otherwise. However, removing the node has implications on the CGSCC
iteration. Locally, that caused some other nodes to be never visited
but it is for sure possible other (bad) side effects can occur. As it
seems conservatively safe to keep the new node in the callee list we
will do that for now.

Reviewers: lebedev.ri, hfinkel, fhahn, probinson, wristow, loladiro, sstefan1, uenoku

Subscribers: hiraditya, bollu, uenoku, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77854
2020-04-15 18:38:50 -05:00
..
benchmarks
bindings
cmake Revert "[lit] Keep original cfg file case around." 2020-04-15 17:19:39 -04:00
docs [docs] Fix an RST error introduced in e823068306. 2020-04-15 14:37:58 -07:00
examples Enable new passmanager plugin support for LTO. 2020-04-14 15:07:07 -07:00
include [CallGraphUpdater] Update the ExternalCallingNode for node replacements 2020-04-15 18:38:50 -05:00
lib [CallGraphUpdater] Update the ExternalCallingNode for node replacements 2020-04-15 18:38:50 -05:00
projects
resources
runtimes
test [AMDGPU] Fixed lane mask in test. NFC. 2020-04-15 15:26:53 -07:00
tools Allow disabling of vectorization using internal options 2020-04-14 18:09:10 -07:00
unittests [CallGraphUpdater] Update the ExternalCallingNode for node replacements 2020-04-15 18:38:50 -05:00
utils Revert "[lit] Keep original cfg file case around." 2020-04-15 17:19:39 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [Flang] add flang as a new subproject in cmake 2020-04-09 16:13:18 +01:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.