| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 142493
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 142492
|
|
|
|
|
|
|
| |
directly manipulates the weights inside of the BranchProbabilityInfo
that is passed in.
llvm-svn: 142163
|
|
|
|
|
|
|
|
| |
- 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.
llvm-svn: 139110
|
|
|
|
|
|
| |
one than one successor goes to the same block.
llvm-svn: 136638
|
|
|
|
| |
llvm-svn: 136588
|
|
|
|
| |
llvm-svn: 136587
|
|
|
|
|
|
| |
it to RHS anyway.
llvm-svn: 136586
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 136502
|
|
|
|
|
|
| |
rounding errors.
llvm-svn: 136456
|
|
|
|
|
|
|
| |
LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce
number of rounding errors.
llvm-svn: 136428
|
|
|
|
| |
llvm-svn: 136402
|
|
|
|
|
|
|
| |
there is no frequency difference whether condition is in the header or in
the latch.
llvm-svn: 136398
|
|
|
|
| |
llvm-svn: 135353
|
|
|
|
|
|
| |
not isEquality().
llvm-svn: 135296
|
|
|
|
| |
llvm-svn: 133776
|
|
|
|
| |
llvm-svn: 133766
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 132925
|
|
|
|
|
|
|
|
|
| |
Patch by: Jakub Staszak!
Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.
llvm-svn: 132867
|
|
|
|
| |
llvm-svn: 132620
|
|
|
|
| |
llvm-svn: 132616
|
|
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
|