1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Go to file
Kazu Hirata dbf4c4b77e [Inlining] Set inline-deferral-scale to 2.
Summary:
This patch sets inline-deferral-scale to 2.

Both internal and SPEC benchmarking show that 2 is the best number
among -1, 2, 3, and 4.

inline-deferral-scale  SPECint2006
------------------------------------------------------------
                   -1  38.0 (the default without this patch)
                    2  38.5
                    3  38.1
                    4  38.1

With the new default number, shouldBeDeferred returns true if:

  TotalCost < IC.getCost() * 2

where

  TotalCost is TotalSecondaryCost + IC.getCost() * NumCallerUsers.

If TotalCost >= 0 and NumCallerUsers >= 2, then
TotalCost >= IC.getCost() * 2, so shouldBeDeferred returns true only
when NumCallerUsers is 1.

Now, if TotalSecondaryCost < 0, which can happen if
InlineConstants::LastCallToStaticBonus, a huge number, has been
subtracted from TotalSecondaryCost, then TotalCost may be negative.
In this case, shouldBeDeferred may return true even when
NumCallerUsers >= 2.

Reviewers: davidxl, nikic

Reviewed By: davidxl

Subscribers: xbolva00, hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80229
2020-05-25 15:44:20 -07:00
benchmarks
bindings Fix go bindings after FixedVectorType -> VectorType change. 2020-05-15 16:37:57 -07:00
cmake [CMake] Properly handle the LTO cache arguments for MinGW 2020-05-25 10:34:09 +03:00
docs [AMDGPU][CODEGEN] Added 'A' constraint for inline assembler 2020-05-25 14:23:34 +03:00
examples StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
include [Transforms] Fix typos. NFC 2020-05-25 22:34:08 +02:00
lib [Inlining] Set inline-deferral-scale to 2. 2020-05-25 15:44:20 -07:00
projects
resources
runtimes
test [Transforms] Fix typos. NFC 2020-05-25 22:34:08 +02:00
tools [CMake] Fix typos. NFC 2020-05-22 14:40:43 +02:00
unittests [PatternMatch] abbreviate vector inst matchers; NFC 2020-05-24 09:19:47 -04:00
utils [gn build] Port ba92b274225 2020-05-25 18:14:50 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [AIX] Make sure we use export lists for plugins 2020-05-08 14:00:25 -04:00
CODE_OWNERS.TXT
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
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.