Mirror of official llvm git repository located at http://llvm.org/git/llvm. Updated every five minutes.
Go to file
Serguei Katkov 8c6e6605aa [BPI] Use metadata info before any other heuristics
Metadata potentially is more precise than any heuristics we use, so
it makes sense to use first metadata info if it is available. However it makes
sense to examine it against other strong heuristics like unreachable one.
If edge coming to unreachable block has higher probability then it is expected 
by unreachable heuristic then we use heuristic and remaining probability is
distributed among other reachable blocks equally.

An example where metadata might be more strong then unreachable heuristic is
as follows: it is possible that there are two branches and for the branch A
metadata says that its probability is (0, 2^25). For the branch B
the probability is (1, 2^25).
So the expectation is that first edge of B is hotter than first edge of A
because first edge of A did not executed at least once.
If first edge of A points to the unreachable block then using the unreachable
heuristics we'll set the probability for A to (1, 2^20) and now edge of A
becomes hotter than edge of B.
This is unexpected behavior.

This fixed the biggest part of https://bugs.llvm.org/show_bug.cgi?id=32214

Reviewers: sanjoy, junbuml, vsk, chandlerc

Reviewed By: chandlerc

Subscribers: llvm-commits, reames, davidxl

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-17 04:33:04 +00:00
bindings
cmake Reverting cmake/modules/AddLLVM.cmake changes from revision 300184 (Added by mistake). 2017-04-13 09:26:49 +00:00
docs [libFuzzer] more trophies 2017-04-14 20:11:16 +00:00
examples
include Garbage collect HAVE_EXECINFO_H from config.h.cmake after r300062. NFCI. 2017-04-16 17:22:44 +00:00
lib [BPI] Use metadata info before any other heuristics 2017-04-17 04:33:04 +00:00
projects
resources
runtimes [CMake][runtimes] Use -nodefaultlibs for the runtimes build 2017-04-13 21:29:03 +00:00
test [BPI] Use metadata info before any other heuristics 2017-04-17 04:33:04 +00:00
tools [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
unittests [APInt] Fix a bug in lshr by a value more than 64 bits above the bit width. 2017-04-16 01:03:51 +00:00
utils build_llvm_package.bat: Move to VS2017 2017-04-13 23:13:23 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
configure
CREDITS.TXT
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.