llvm/lib
Kyle Butt c160e2a10f CodeGen: BlockPlacement: Precompute layout for chains of triangles.
For chains of triangles with small join blocks that can be tail duplicated, a
simple calculation of probabilities is insufficient. Tail duplication
can be profitable in 3 different ways for these cases:

1) The post-dominators marked 50% are actually taken 56% (This shrinks with
   longer chains)
2) The chains are statically correlated. Branch probabilities have a very
   U-shaped distribution.
   [http://nrs.harvard.edu/urn-3:HUL.InstRepos:24015805]
   If the branches in a chain are likely to be from the same side of the
   distribution as their predecessor, but are independent at runtime, this
   transformation is profitable. (Because the cost of being wrong is a small
   fixed cost, unlike the standard triangle layout where the cost of being
   wrong scales with the # of triangles.)
3) The chains are dynamically correlated. If the probability that a previous
   branch was taken positively influences whether the next branch will be
   taken
We believe that 2 and 3 are common enough to justify the small margin in 1.

The code pre-scans a function's CFG to identify this pattern and marks the edges
so that the standard layout algorithm can use the computed results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-03 01:00:22 +00:00
..
Analysis Revert r296575 "[SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available" 2017-03-01 18:57:16 +00:00
AsmParser Change debug-info-for-profiling from a TargetOption to a function attribute. 2017-02-01 22:45:09 +00:00
Bitcode Move symbols from the global namespace into (anonymous) namespaces. NFC. 2017-02-11 11:06:55 +00:00
CodeGen CodeGen: BlockPlacement: Precompute layout for chains of triangles. 2017-03-03 01:00:22 +00:00
DebugInfo [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine [Orc] Rename ObjectLinkingLayer -> RTDyldObjectLinkingLayer. 2017-02-20 05:45:14 +00:00
Fuzzer [libFuzzer] remove usage of the old coverage instrumentation 2017-02-28 23:23:48 +00:00
IR Keep attributes, calling convention, etc, when remangling intrinsic 2017-03-01 01:49:13 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker IRMover: Merge flags LinkModuleInlineAsm and IsPerformingImport. 2017-02-03 17:01:14 +00:00
LTO LTO: When creating a local cache, create the cache directory if it does not already exist. 2017-03-02 02:02:38 +00:00
MC [DWARFv5] llvm-mc support for new unit header. 2017-02-28 23:40:46 +00:00
Object Actually add error handling to unpacking the dyld compact bind and 2017-02-28 21:47:07 +00:00
ObjectYAML Move symbols from the global namespace into (anonymous) namespaces. NFC. 2017-02-11 11:06:55 +00:00
Option Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
Passes Add call branch annotation for ICP promoted direct call in SamplePGO mode. 2017-02-23 22:15:18 +00:00
ProfileData [PGO] Fix a bug in reading text format value profile. 2017-02-27 21:42:39 +00:00
Support [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target AMDGPU: Fix missing dominator tree dependency 2017-03-02 23:50:51 +00:00
Transforms [msan] Remove stale comments. 2017-03-03 00:25:56 +00:00
XRay [XRAY] [x86_64] Adding a Flight Data filetype reader to the llvm-xray Trace implementation. 2017-02-17 01:47:16 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt