941aa7b1e8c1b77544d643e8b23ff07f7f83f281 |
|
19-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Generalize the reading of probability metadata to work for both branches and switches, with arbitrary numbers of successors. Still optimized for the common case of 2 successors for a conditional branch. Add a test case for switch metadata showing up in the BlockFrequencyInfo pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
99d01c54a0fd790a48d5aa02bfeb4cc08388b8fa |
|
19-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Teach the BranchProbabilityInfo analysis pass to read any metadata encoding of probabilities. In the absense of metadata, it continues to fall back on static heuristics. This allows __builtin_expect, after lowering through llvm.expect a branch instruction's metadata, to actually enter the branch probability model. This is one component of resolving PR2577. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
7a34c8b602e52a2cc71a897131ec74b85c86bb43 |
|
17-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Delete a dead member. Dunno if this was ever used, but the current code directly manipulates the weights inside of the BranchProbabilityInfo that is passed in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
26eb870d7e0e28ecb25a0cd77e6cdc0490707eff |
|
05-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use canonical forms for the branch probability zero heutistic. - Drop support for X >u 0, it's equivalent to X != 0 and should be canonicalized into the latter. - Add X < 1 -> unlikely, which is what instcombine canonicalizes X <= 0 into. - Add X > -1 -> likely, which is what instcombine canonicalizes X >= 0 into. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
b137f16936a3f3b5a3463eff6cd433e99ac37cb6 |
|
01-Aug-2011 |
Jakub Staszak <jstaszak@apple.com> |
Change SmallVector to SmallPtrSet in BranchProbabilityInfo. Handle cases where one than one successor goes to the same block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
6762dc1fb38f7579b33143c80f057319e1537678 |
|
31-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Do not handle cases with >= and <= predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
4faf553d508f4bc657563ca538392108a3858483 |
|
31-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Remove untrue comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
a385c20d427d8ec1a91ce8bf34612bf4c87cc34f |
|
31-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Do not handle case where LHS is equal to zero, because InstCombiner always moves it to RHS anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
a5dd5505883aa90d01d442e3a5db5aedc2277f9e |
|
31-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Add Zero Heurestics to BranchProbabilityInfo. If we compare value to zero we decide whether condition is likely to be true this way: x == 0 -> false x < 0 -> false x <= 0 -> false x != 0 -> true x > 0 -> true x >= 0 -> true git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
6f6baf1bdd7531da5ddb925ffcfcf38724e9e4aa |
|
29-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Add more constantness in BranchProbabilityInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
e0058b4b0c4d162a3b3ff2ad8a87c979928ba016 |
|
29-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Remove incEdgeWeight and decEdgeWeight. Set edge weight directly to avoid rounding errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
3d8b15ea709ec7fc84e6de191d4eb9858b0b4edf |
|
29-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Change LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum of LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce number of rounding errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
7241caf7b841db57a21a44f64415e3d1a3398a9c |
|
28-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Heuristics are in descending priority now. If we use one of them, skip the rest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
fa44725233aa622b61942ec099b1c46806140b72 |
|
28-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Add InEdges (edges from header to the loop) in Loop Branch Heuristics, so there is no frequency difference whether condition is in the header or in the latch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
12af93ae86cb4a517d1b67f9363fbf21f24f583b |
|
16-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Remove "LoopInfo.h" include from BranchProbabilityInfo.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
d7932ca9627cdd9f913a37ee51f410819aa83cf3 |
|
15-Jul-2011 |
Jakub Staszak <jstaszak@apple.com> |
Fix pointer heuristic. Check whether predicator is ICMP_NE instead of if it is not isEquality(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
66dddd1da3e036d05f94df82221a97b7d26e3498 |
|
24-Jun-2011 |
Jakub Staszak <jstaszak@apple.com> |
Calculate backedge probability correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
44eb49c2a191108df801977c8e3dc03466c6c02a |
|
23-Jun-2011 |
Jakub Staszak <jstaszak@apple.com> |
Introduce BlockFrequency analysis for BasicBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
7cc2b07437a1243c33324549a1904fefc5f1845e |
|
16-Jun-2011 |
Jakub Staszak <jstaszak@apple.com> |
Introduce MachineBranchProbabilityInfo class, which has similar API to BranchProbabilityInfo (expect setEdgeWeight which is not available here). Branch Weights are kept in MachineBasicBlocks. To turn off this analysis set -use-mbpi=false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
afa88eaf659a6151624fd11a61d038864339e8e4 |
|
13-Jun-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move class into an anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
f289df2d9544bd3a0934651daa20e589544413ba |
|
11-Jun-2011 |
Andrew Trick <atrick@apple.com> |
Branch profiling: floating-point avoidance. Patch by: Jakub Staszak! Introduces BranchProbability. Changes unsigned to uint32_t all over and uint64_t only when overflow is expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
404b53e38ca7a77c6e86596ace68f3167cd33922 |
|
04-Jun-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Fold assert-only-used variable into the assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
b4528c3d7ee14a42e86ebaa228c556ea81412eca |
|
04-Jun-2011 |
Andrew Trick <atrick@apple.com> |
Missing include of climits in the new BranchProbability pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|
9e76422b963a65f243fdbee0abed61068b82dd98 |
|
04-Jun-2011 |
Andrew Trick <atrick@apple.com> |
New BranchProbabilityInfo analysis. Patch by Jakub Staszak! BranchProbabilityInfo provides an interface for IR passes to query the likelihood that control follows a CFG edge. This patch provides an initial implementation of static branch predication that will populate BranchProbabilityInfo for branches with no external profile information using very simple heuristics. It currently isn't hooked up to any external profile data, so static prediction does all the work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Analysis/BranchProbabilityInfo.cpp
|