hanchenye-llvm-project/llvm
Dehao Chen f4240b5b91 Separate the ICP total threshold and remaining threshold.
Summary: In the current implementation, isPromotionProfitable only checks if the call count to a direct target is no less than a certain percentage threshold of the remaining call counts that have not been promoted. This causes code size problems when the target count is small but greater than a large portion of remaining counts. E.g. target1 takes 99.9%, while target2 takes 0.1%. Both targets will be promoted and inlined, makes the function size too large, which potentially prevents it from further inlining into its callers. This patch adds another percentage threshold against the total indirect call count. If the target count needs to be no less than both thresholds in order to be promoted speculatively.

Reviewers: davidxl, tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 309345
2017-07-28 01:02:54 +00:00
..
bindings [OCaml] Fix undefined reference to LLVMDumpType() with NDEBUG 2017-07-27 21:13:25 +00:00
cmake [OCaml] Respect CMAKE_C_FLAGS for OCaml C files 2017-07-27 21:13:19 +00:00
docs [docs] change a few code-blocks to llvm from text 2017-07-26 14:11:23 +00:00
examples Defeat another -Wunused-but-set-variable warning 2017-07-19 15:06:31 +00:00
include Separate the ICP total threshold and remaining threshold. 2017-07-28 01:02:54 +00:00
lib Separate the ICP total threshold and remaining threshold. 2017-07-28 01:02:54 +00:00
projects
resources
runtimes [CMake] Remove redundant logic in runtimes/CMakeList.txt 2017-07-24 17:26:28 +00:00
test Separate the ICP total threshold and remaining threshold. 2017-07-28 01:02:54 +00:00
tools [llvm-pdbutil] Clean up ExitOnError usage to add ": " to our errors 2017-07-27 23:13:18 +00:00
unittests [TargetParser] Use enum classes for various ARM kind enums. 2017-07-27 16:27:56 +00:00
utils [lit] Fix TestRunner unit test on Windows 2017-07-27 19:27:10 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Un-revert "Teach the CMake build system to run lit's test suite. These can be run" 2017-07-27 19:18:35 +00:00
CODE_OWNERS.TXT Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
CREDITS.TXT Another test commit 2017-07-01 03:24:06 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00
configure
llvm.spec.in

README.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.