summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BranchProbabilityInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove untrue comment.Jakub Staszak2011-07-311-3/+0
| | | | llvm-svn: 136587
* Do not handle case where LHS is equal to zero, because InstCombiner always movesJakub Staszak2011-07-311-24/+8
| | | | | | it to RHS anyway. llvm-svn: 136586
* Add Zero Heurestics to BranchProbabilityInfo. If we compare value to zero weJakub Staszak2011-07-311-1/+91
| | | | | | | | | | | | | 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 llvm-svn: 136583
* Add more constantness in BranchProbabilityInfo.Jakub Staszak2011-07-291-10/+11
| | | | llvm-svn: 136502
* Remove incEdgeWeight and decEdgeWeight. Set edge weight directly to avoidJakub Staszak2011-07-291-30/+35
| | | | | | rounding errors. llvm-svn: 136456
* Change LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum ofJakub Staszak2011-07-281-4/+4
| | | | | | | LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce number of rounding errors. llvm-svn: 136428
* Heuristics are in descending priority now. If we use one of them, skip the rest.Jakub Staszak2011-07-281-13/+23
| | | | llvm-svn: 136402
* Add InEdges (edges from header to the loop) in Loop Branch Heuristics, soJakub Staszak2011-07-281-0/+17
| | | | | | | there is no frequency difference whether condition is in the header or in the latch. llvm-svn: 136398
* Remove "LoopInfo.h" include from BranchProbabilityInfo.h.Jakub Staszak2011-07-161-0/+5
| | | | llvm-svn: 135353
* Fix pointer heuristic. Check whether predicator is ICMP_NE instead of if it isJakub Staszak2011-07-151-2/+2
| | | | | | not isEquality(). llvm-svn: 135296
* Calculate backedge probability correctly.Jakub Staszak2011-06-231-24/+0
| | | | llvm-svn: 133776
* Introduce BlockFrequency analysis for BasicBlocks.Jakub Staszak2011-06-231-0/+24
| | | | llvm-svn: 133766
* Introduce MachineBranchProbabilityInfo class, which has similar API toJakub Staszak2011-06-161-1/+1
| | | | | | | | BranchProbabilityInfo (expect setEdgeWeight which is not available here). Branch Weights are kept in MachineBasicBlocks. To turn off this analysis set -use-mbpi=false. llvm-svn: 133184
* Move class into an anonymous namespace.Benjamin Kramer2011-06-131-1/+2
| | | | llvm-svn: 132925
* Branch profiling: floating-point avoidance.Andrew Trick2011-06-111-54/+63
| | | | | | | | | Patch by: Jakub Staszak! Introduces BranchProbability. Changes unsigned to uint32_t all over and uint64_t only when overflow is expected. llvm-svn: 132867
* Fold assert-only-used variable into the assert.Nick Lewycky2011-06-041-2/+1
| | | | llvm-svn: 132620
* Missing include of climits in the new BranchProbability pass.Andrew Trick2011-06-041-0/+1
| | | | llvm-svn: 132616
* New BranchProbabilityInfo analysis. Patch by Jakub Staszak!Andrew Trick2011-06-041-0/+348
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. llvm-svn: 132613
OpenPOWER on IntegriCloud