| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 270113
|
|
|
|
| |
llvm-svn: 270074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
- Remove the base ProfError class to work around an MSVC ICE.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 270020
|
|
|
|
|
|
|
| |
`ConstantRange::getEquivalentICmp` is more general, and better
factored.
llvm-svn: 270019
|
|
|
|
|
|
|
| |
PredicatePassProbability is a better name for what LikelyBranchWeight
was trying to express.
llvm-svn: 269999
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Implement guard widening in LLVM. Description from GuardWidening.cpp:
The semantics of the `@llvm.experimental.guard` intrinsic lets LLVM
transform it so that it fails more often that it did before the
transform. This optimization is called "widening" and can be used hoist
and common runtime checks in situations like these:
```
%cmp0 = 7 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
%cmp1 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp1) [ "deopt"(...) ]
...
```
to
```
%cmp0 = 9 u< Length
call @llvm.experimental.guard(i1 %cmp0) [ "deopt"(...) ]
call @unknown_side_effects()
...
```
If `%cmp0` is false, `@llvm.experimental.guard` will "deoptimize" back
to a generic implementation of the same function, which will have the
correct semantics from that point onward. It is always _legal_ to
deoptimize (so replacing `%cmp0` with false is "correct"), though it may
not always be profitable to do so.
NB! This pass is a work in progress. It hasn't been tuned to be
"production ready" yet. It is known to have quadriatic running time and
will not scale to large numbers of guards
Reviewers: reames, atrick, bogner, apilipenko, nlewycky
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D20143
llvm-svn: 269997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when simplifying CFG.
Summary: Set default branch weight to 1:1 if one of the branch has profile missing when simplifying CFG.
Reviewers: spatel, davidxl
Subscribers: danielcdh, llvm-commits
Differential Revision: http://reviews.llvm.org/D20307
llvm-svn: 269995
|
|
|
|
|
|
|
|
|
| |
branches, along with their operands.
Previously, we didn't add their and their operands cost, which could've
resulted in unrolling loops for no actual benefit.
llvm-svn: 269985
|
|
|
|
| |
llvm-svn: 269974
|
|
|
|
| |
llvm-svn: 269937
|
|
|
|
|
|
|
|
|
|
| |
In truncateToMinimalBitwidths() we were RAUW'ing an instruction then erasing it. However, that intruction could be cached in the map we're iterating over. The first check is "I->use_empty()" which in most cases would return true, as the (deleted) object was RAUW'd first so would have zero use count. However in some cases the object could have been polluted or written over and this wouldn't be the case. Also it makes valgrind, asan and traditionalists who don't like their compiler to crash sad.
No testcase as there are no externally visible symptoms apart from a crash if the stars align.
Fixes PR26509.
llvm-svn: 269908
|
|
|
|
|
|
| |
Patch by JakeVanAdrighem. Thanks!
llvm-svn: 269847
|
|
|
|
| |
llvm-svn: 269839
|
|
|
|
|
|
| |
It doesn't matter if the comparison is unsigned; the inc/dec is always signed.
llvm-svn: 269831
|
|
|
|
| |
llvm-svn: 269829
|
|
|
|
|
|
| |
The API is simpler. Suggested by David Blaikie!
llvm-svn: 269800
|
|
|
|
|
|
|
| |
This bug was introduced in r269728 and is the likely cause of many stage 2 ubsan bot failures.
I'll add a test in a follow-up commit assuming this fixes things properly.
llvm-svn: 269797
|
|
|
|
|
|
|
| |
Guards are expected to basically never fail. Reflect this in the branch
probabilities in their lowered form.
llvm-svn: 269791
|
|
|
|
| |
llvm-svn: 269768
|
|
|
|
| |
llvm-svn: 269767
|
|
|
|
|
|
|
|
|
|
| |
This is assertion is no longer necessary since we never record
constants in the live set anyway. (They are never recorded in
the initial live set, and constant bases are removed near line 2119)
Differential Revision: http://reviews.llvm.org/D20293
llvm-svn: 269764
|
|
|
|
|
|
| |
Fixes PR27786.
llvm-svn: 269757
|
|
|
|
| |
llvm-svn: 269729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
icmp (PR27756)
Fix a bug introduced with rL269426 :
[InstCombine] canonicalize* LE/GE vector integer comparisons to LT/GT (PR26701, PR26819)
We were assuming that a ConstantDataVector / ConstantVector / ConstantAggregateZero operand of
an ICMP was composed of ConstantInt elements, but it might have ConstantExpr or UndefValue
elements. Handle those appropriately.
Also, refactor this function to join the scalar and vector paths and eliminate the switches.
Differential Revision: http://reviews.llvm.org/D20289
llvm-svn: 269728
|
|
|
|
|
|
|
|
| |
This reverts commit r269694. MSVC says:
error C2086: 'char llvm::ProfErrorInfoBase<enum llvm::instrprof_error>::ID' : redefinition
llvm-svn: 269700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Address undefined-var-template warning.
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269694
|
|
|
|
| |
llvm-svn: 269660
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The selection of the vectorization factor currently doesn't consider
interleaved accesses. The vectorization factor is based on the maximum safe
dependence distance computed by LAA. However, for loops with interleaved
groups, we should instead base the vectorization factor on the maximum safe
dependence distance divided by the maximum interleave factor of all the
interleaved groups. Interleaved accesses not in a group will be scalarized.
Differential Revision: http://reviews.llvm.org/D20241
llvm-svn: 269659
|
|
|
|
| |
llvm-svn: 269624
|
|
|
|
| |
llvm-svn: 269591
|
|
|
|
|
|
|
|
|
|
|
|
| |
TargetLibraryInfoWrapperPass is a dependency of
SCCP but it's not listed as such. Chandler pointed
out this is an easy mistake to make which only
surfaces in weird crashes with some flag combinations.
This code will go away anyway at some point in the
future, but as long as it's (still) exercised, try
to make it correct.
llvm-svn: 269589
|
|
|
|
| |
llvm-svn: 269586
|
|
|
|
| |
llvm-svn: 269578
|
|
|
|
|
|
|
| |
This reverts commit r269491. It triggers warnings with Clang, breaking
builds for -Werror users including several build bots.
llvm-svn: 269547
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D20000
llvm-svn: 269518
|
|
|
|
| |
llvm-svn: 269511
|
|
|
|
| |
llvm-svn: 269494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Changes since the initial commit:
- Fix error message printing in llvm-profdata.
- Check errors in loadTestingFormat() + annotateAllFunctions().
- Defer error handling in InstrProfIterator to InstrProfReader.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269491
|
|
|
|
|
|
|
|
|
|
| |
increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...""
This reverts commit r269395.
Try to reapply with a fix from chapuni.
llvm-svn: 269486
|
|
|
|
| |
llvm-svn: 269482
|
|
|
|
| |
llvm-svn: 269471
|
|
|
|
|
|
|
|
| |
Use Error in InstrProf and Coverage, NFC"
This reverts commit r269462. It fails two llvm-profdata tests.
llvm-svn: 269466
|
|
|
|
|
|
|
|
|
| |
Transition InstrProf and Coverage over to the stricter Error/Expected
interface.
Differential Revision: http://reviews.llvm.org/D19901
llvm-svn: 269462
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Rename DataLayout::getLargestLegalIntTypeSize to DataLayout::getLargestLegalIntTypeSizeInBits() to prevent similar mistakes fixed in r269433.
Reviewers: joker.eph, mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D20248
llvm-svn: 269456
|
|
|
|
| |
llvm-svn: 269445
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhancement to: http://reviews.llvm.org/rL269426
With discussion in: http://reviews.llvm.org/D17859
This should complete the fixes for: PR26701, PR26819:
https://llvm.org/bugs/show_bug.cgi?id=26701
https://llvm.org/bugs/show_bug.cgi?id=26819
llvm-svn: 269439
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently there is no reasonable way to control the warnings in the 'use' phase
of the IRPGO pass. This is problematic because the output can be somewhat
spammy. This patch adds some flags which allow us to optionally disable these
warnings. The current upstream behavior will remain the default.
Patch by Jake VanAdrighem (jvanadrighem@gmail.com)
Differential Revision: http://reviews.llvm.org/D20195
llvm-svn: 269437
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This change fix the bug in isProfitableToUseMemset() where MaxIntSize shoule be in byte, not bit.
Reviewers: arsenm, joker.eph, mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D20176
llvm-svn: 269433
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(PR26701, PR26819)
*We don't currently handle the edge case constants (min/max values), so it's not a complete
canonicalization.
To fully solve the motivating bugs, we need to enhance this to recognize a zero vector
too because that's a ConstantAggregateZero which is a ConstantData, not a ConstantVector
or a ConstantDataVector.
Differential Revision: http://reviews.llvm.org/D17859
llvm-svn: 269426
|
|
|
|
|
|
|
|
|
|
|
| |
tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."
This reverts commit r269388.
It caused some bots to fail, I'm reverting it until I investigate the
issue.
llvm-svn: 269395
|