mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Mirror of https://github.com/RPCS3/llvm-mirror
f3b675c071
In weird cases, the inliner will inline internal recursive functions, sometimes causing them to have no more uses, in which case the inliner will mark the function to be deleted. The function is actually deleted after the call to updateCGAndAnalysisManagerForCGSCCPass(). In updateCGAndAnalysisManagerForCGSCCPass(), UR.UpdatedC may be set to the SCC containing the function to be deleted. Then the inliner calls CG.removeDeadFunction() which can cause that SCC to be deleted, even though it's still stored in UR.UpdatedC. We could potentially check in the wrappers/pass managers if UR.UpdatedC is in UR.InvalidatedSCCs before doing anything with it, but it's safer to do this as close to possible to the call to CG.removeDeadFunction() to avoid issues with allocating a new SCC in the same address as the deleted one. It's hard to find a small test case since we need to have recursive internal functions be reachable from non-internal functions, yet they need to become non-recursive and not referenced by other functions when inlined. Similar to https://reviews.llvm.org/D106306. Fixes PR50788. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D106405 |
||
---|---|---|
benchmarks | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
configure | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
llvm.spec.in | ||
README.txt | ||
RELEASE_TESTERS.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.