1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Go to file
whitequark c0e7687557 [MergeFunctions] Fix merging of small weak functions
When two interposable functions are merged, we cannot replace
uses and have to emit calls to a common internal function. However,
writeThunk() will not actually emit a thunk if the function is too
small. This leaves us in a broken state where mergeTwoFunctions
already rewired the functions, but writeThunk doesn't do anything.

This patch changes the implementation so that:

 * writeThunk() does just that.
 * The direct replacement of calls is moved into mergeTwoFunctions()
   into the non-interposable case only.
 * isThunkProfitable() is extracted and will be called for
   the non-iterposable case always, and in the interposable case
   only if uses are still left after replacement.

This issue has been introduced in https://reviews.llvm.org/D34806,
where the code for checking thunk profitability has been moved.

Differential Revision: https://reviews.llvm.org/D46804

Reviewed By: whitequark

llvm-svn: 332342
2018-05-15 11:31:07 +00:00
bindings [LLVM-C] Consolidate llgo's DIBuilder Bindings 2018-05-10 21:10:06 +00:00
cmake [CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info 2018-05-09 00:07:42 +00:00
docs Docs: Fix the title underline too short. 2018-05-14 13:54:39 +00:00
examples s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
include [NFC] Update comments 2018-05-15 04:06:28 +00:00
lib [MergeFunctions] Fix merging of small weak functions 2018-05-15 11:31:07 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [CMake] Enable warnings for runtimes 2018-04-27 15:10:50 +00:00
test [MergeFunctions] Fix merging of small weak functions 2018-05-15 11:31:07 +00:00
tools [llvm-mca] Remove unused include header files. NFC 2018-05-15 10:30:39 +00:00
unittests [llvm-exegesis] InMemoryAssembler: handle return-less targets (e.g. arm). 2018-05-15 07:40:21 +00:00
utils Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore
CMakeLists.txt Remove LLVM_INSTALL_CCTOOLS_SYMLINKS 2018-04-24 15:41:02 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Update my email address. 2018-04-23 19:09:49 +00:00
configure
CREDITS.TXT Update my email address and description. 2018-04-29 01:13:57 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT

Low Level Virtual Machine (LLVM)
================================

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.