llvm/test
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
..
Analysis [BPI] Use metadata info before any other heuristics 2017-04-17 04:33:04 +00:00
Assembler Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
Bindings
Bitcode Bitcode: Do not create FNENTRYs for aliases of functions. 2017-04-06 19:39:24 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll: Use %/s for its path not to be mis-escaped. 2017-04-13 11:40:32 +00:00
CodeGen [X86] Remove special handling for 16 bit for A asm constraints. 2017-04-16 20:13:08 +00:00
DebugInfo [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
Examples
ExecutionEngine
Feature [GVNHoist] Re-enable GVNHoist by default 2017-04-11 14:36:30 +00:00
FileCheck [FileCheck] Added --enable-var-scope option to enable scope for regex variables. 2017-03-09 17:59:04 +00:00
Instrumentation [Profile] PE binary coverage bug fix 2017-04-13 23:37:12 +00:00
Integer
JitListener
LibDriver
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
MC [AMDGPU][MC] Corrected ds_write_src2_* to require one offset instead of two. 2017-04-14 12:28:07 +00:00
Object [llvm-ar] errors go on stderr and not on stdout. 2017-04-05 14:52:17 +00:00
ObjectYAML [Test commit] Cleanup some whitespace in a test file 2017-04-14 18:43:57 +00:00
Other Remove readnone from invariant.group.barrier 2017-04-12 20:45:12 +00:00
SymbolRewriter
TableGen [globalisel][tablegen] Add experimental support for OperandWithDefaultOps, PredicateOperand, and OptionalDefOperand 2017-04-12 08:23:08 +00:00
ThinLTO/X86 llvm-lto2: Move the LTO::run() action behind a subcommand. 2017-04-11 18:12:00 +00:00
tools [WebAssembly] Improve readobj and nm support for wasm 2017-04-14 19:50:44 +00:00
Transforms [InstCombine] Simplify 1/X for vectors. 2017-04-17 03:41:47 +00:00
Unit
Verifier Verifier: Check some amdgpu calling convention restrictions 2017-04-04 18:43:11 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
TestRunner.sh