|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
645d2dd3 |
| 20-Jul-2022 |
Chuanqi Xu <[email protected]> |
Revert "Don't treat readnone call in presplit coroutine as not access memory"
This reverts commit 57224ff4a6833dca1f17568cc9cf77f9579030ae. This commit may trigger crashes on some workloads. Revert
Revert "Don't treat readnone call in presplit coroutine as not access memory"
This reverts commit 57224ff4a6833dca1f17568cc9cf77f9579030ae. This commit may trigger crashes on some workloads. Revert it for clearness.
show more ...
|
| #
57224ff4 |
| 20-Jul-2022 |
Chuanqi Xu <[email protected]> |
Don't treat readnone call in presplit coroutine as not access memory
To solve the readnone problems in coroutines. See https://discourse.llvm.org/t/address-thread-identification-problems-with-corout
Don't treat readnone call in presplit coroutine as not access memory
To solve the readnone problems in coroutines. See https://discourse.llvm.org/t/address-thread-identification-problems-with-coroutine/62015 for details.
According to the discussion, we decide to fix the problem by inserting isPresplitCoroutine() checks in different passes instead of wrapping/unwrapping readnone attributes in CoroEarly/CoroCleanup passes. In this direction, we might not be able to cover every case at first. Let's take a "find and fix" strategy.
Reviewed By: nikic, nhaehnle, jyknight
Differential Revision: https://reviews.llvm.org/D127383
show more ...
|
| #
601b3a13 |
| 17-Jul-2022 |
Kazu Hirata <[email protected]> |
[Analysis] Qualify auto variables in for loops (NFC)
|
| #
54eff7da |
| 24-Jun-2022 |
Nikita Popov <[email protected]> |
[AA] Export isEscapeSource() API (NFC)
Export API that was previously private to BasicAliasAnalysis and will be used in D127202.
|
| #
bcadfc25 |
| 23-Jun-2022 |
Nikita Popov <[email protected]> |
[BasicAA] Handle passthru calls in isEscapeSource()
isEscapeSource() currently considers all call return values as escape sources. However, CaptureTracking can look through certain calls, so we shou
[BasicAA] Handle passthru calls in isEscapeSource()
isEscapeSource() currently considers all call return values as escape sources. However, CaptureTracking can look through certain calls, so we shouldn't consider these as escape sources either.
The corresponding CaptureTracking code is: https://github.com/llvm/llvm-project/blob/7c9a3825b8420f5d37c5bb8919a9e46684a87089/llvm/lib/Analysis/CaptureTracking.cpp#L332-L333
Differential Revision: https://reviews.llvm.org/D128444
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
6bec3e93 |
| 06-Oct-2021 |
Jay Foad <[email protected]> |
[APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf
Most clients only used these methods because they wanted to be able to extend or truncate to the same bit width (which is a no-op).
[APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf
Most clients only used these methods because they wanted to be able to extend or truncate to the same bit width (which is a no-op). Now that the standard zext, sext and trunc allow this, there is no reason to use the OrSelf versions.
The OrSelf versions additionally have the strange behaviour of allowing extending to a *smaller* width, or truncating to a *larger* width, which are also treated as no-ops. A small amount of client code relied on this (ConstantRange::castOp and MicrosoftCXXNameMangler::mangleNumber) and needed rewriting.
Differential Revision: https://reviews.llvm.org/D125557
show more ...
|
| #
f7988d08 |
| 18-May-2022 |
Philip Reames <[email protected]> |
Revert "[BasicAA] Remove unneeded special case for malloc/calloc"
This reverts commit 9b1e00738c5ddba681e17e5cb7c260d9afc4c3a7.
Nikic reported in commit thread that I had forgotten history here, an
Revert "[BasicAA] Remove unneeded special case for malloc/calloc"
This reverts commit 9b1e00738c5ddba681e17e5cb7c260d9afc4c3a7.
Nikic reported in commit thread that I had forgotten history here, and that a) we'd tried this before, and b) had to revert due to an unexpected codegen impact. Current measurements confirm the same issue still exists.
show more ...
|
| #
9b1e0073 |
| 18-May-2022 |
Philip Reames <[email protected]> |
[BasicAA] Remove unneeded special case for malloc/calloc
This code pre-exists the generic handling for inaccessiblememonly. If we remove it and update one test with inaccessiblememonly, nothing els
[BasicAA] Remove unneeded special case for malloc/calloc
This code pre-exists the generic handling for inaccessiblememonly. If we remove it and update one test with inaccessiblememonly, nothing else changes. Note that simply running O1 on that test would annotate malloc with the missing inaccessiblememonly.
show more ...
|
| #
7e0802ae |
| 10-May-2022 |
Arthur Eubanks <[email protected]> |
[BasicAA] Fix order in which we pass MemoryLocations to alias()
D98718 caused the order of Values/MemoryLocations we pass to alias() to be significant due to storing the offset in the PartialAlias c
[BasicAA] Fix order in which we pass MemoryLocations to alias()
D98718 caused the order of Values/MemoryLocations we pass to alias() to be significant due to storing the offset in the PartialAlias case. But some callers weren't audited and were still passing swapped arguments, causing the returned PartialAlias offset to be negative in some cases. For example, the newly added unittests would return -1 instead of 1.
Fixes #55343, a miscompile.
Reviewed By: asbirlea, nikic
Differential Revision: https://reviews.llvm.org/D125328
show more ...
|
| #
b22ffc7b |
| 07-Apr-2022 |
Arthur Eubanks <[email protected]> |
[CaptureTracking] Ignore ephemeral values in EarliestEscapeInfo
And thread DSE's ephemeral values to EarliestEscapeInfo.
This allows more precise analysis in DSEState::isReadClobber() via BatchAA.
[CaptureTracking] Ignore ephemeral values in EarliestEscapeInfo
And thread DSE's ephemeral values to EarliestEscapeInfo.
This allows more precise analysis in DSEState::isReadClobber() via BatchAA.
Followup to D123162.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D123342
show more ...
|
| #
1b7ef6aa |
| 18-Mar-2022 |
Florian Hahn <[email protected]> |
[BasicAA] Account for wrapping when using abs(VarIndex) >= abs(Scale).
The patch adds an extra check to only set MinAbsVarIndex if abs(V * Scale) won't wrap. In the absence of IsNSW, try to use the
[BasicAA] Account for wrapping when using abs(VarIndex) >= abs(Scale).
The patch adds an extra check to only set MinAbsVarIndex if abs(V * Scale) won't wrap. In the absence of IsNSW, try to use the bitwidths of the original V and Scale to rule out wrapping.
Attempt to model https://alive2.llvm.org/ce/z/HE8ZKj
The code in the else if below probably needs the same treatment, but I need to come up with a test first.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D121695
show more ...
|
| #
71c3a551 |
| 28-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Diff
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120659
show more ...
|
| #
d7424939 |
| 24-Jan-2022 |
Evgeniy Brevnov <[email protected]> |
[BasicAA] Add support for memmove intrinsic
Currently, basic AA has special support for llvm.memcpy.* intrinsics. This change extends this support for any memory trancsfer opration and in particular
[BasicAA] Add support for memmove intrinsic
Currently, basic AA has special support for llvm.memcpy.* intrinsics. This change extends this support for any memory trancsfer opration and in particular llvm.memmove.* intrinsic.
Reviewed By: reames, nikic
Differential Revision: https://reviews.llvm.org/D117095
show more ...
|
| #
0e55d4fa |
| 24-Jan-2022 |
Evgeniy Brevnov <[email protected]> |
[AA] Refine ModRefInfo for llvm.memcpy.* in presence of operand bundles
Presence of operand bundles changes semantics in respect to ModRef. In particular, spec says: "From the compilers perspective,
[AA] Refine ModRefInfo for llvm.memcpy.* in presence of operand bundles
Presence of operand bundles changes semantics in respect to ModRef. In particular, spec says: "From the compilers perspective, deoptimization operand bundles make the call sites theyre attached to at least readonly. They read through all of their pointer typed operands (even if theyre not otherwise escaped) and the entire visible heap. Deoptimization operand bundles do not capture their operands except during deoptimization, in which case control will not be returned to the compiled frame". Fix handling of llvm.memcpy.* according to the spec.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D118033
show more ...
|
| #
dd13744b |
| 14-Jan-2022 |
Bryce Wilson <[email protected]> |
Revert "[BasicAliasAnalysis] Remove isMallocOrCallocLikeFn"
This reverts commit 1f2cfc4fdc1eefb2c5f562c77a5fe7e916bbf670.
|
| #
1f2cfc4f |
| 13-Jan-2022 |
Bryce Wilson <[email protected]> |
[BasicAliasAnalysis] Remove isMallocOrCallocLikeFn
Allocation functions should be marked with onlyAccessesInaccessibleMemory (when that is correct for the given function) which is checked elsewhere
[BasicAliasAnalysis] Remove isMallocOrCallocLikeFn
Allocation functions should be marked with onlyAccessesInaccessibleMemory (when that is correct for the given function) which is checked elsewhere so this check is no longer needed.
Differential Revision: https://reviews.llvm.org/D117180
show more ...
|
| #
c16fd6a3 |
| 05-Jan-2022 |
Philip Reames <[email protected]> |
Rename doesNotReadMemory to onlyWritesMemory globally [NFC]
The naming has come up as a source of confusion in several recent reviews. onlyWritesMemory is consist with onlyReadsMemory which we use
Rename doesNotReadMemory to onlyWritesMemory globally [NFC]
The naming has come up as a source of confusion in several recent reviews. onlyWritesMemory is consist with onlyReadsMemory which we use for the corresponding readonly case as well.
show more ...
|
| #
0edf9995 |
| 28-Dec-2021 |
Sanjay Patel <[email protected]> |
[Analysis] allow caller to choose signed/unsigned when computing constant range
We should not lose analysis precision if an 'add' has both no-wrap flags (nsw and nuw) compared to just one or the oth
[Analysis] allow caller to choose signed/unsigned when computing constant range
We should not lose analysis precision if an 'add' has both no-wrap flags (nsw and nuw) compared to just one or the other.
This patch is modeled on a similar construct that was added with D59386.
I don't think it is possible to expose a problem with an unsigned compare because of the way this was coded (nuw is handled first).
InstCombine has an assert that fires with the example from: https://github.com/llvm/llvm-project/issues/52884 ...because it was expecting InstSimplify to handle this kind of pattern with an smax.
Fixes #52884
Differential Revision: https://reviews.llvm.org/D116322
show more ...
|
| #
6192c312 |
| 17-Dec-2021 |
Momchil Velikov <[email protected]> |
[AA] Correctly maintain the sign of PartiaAlias offset
Preserve the invariant that offset reported in the case of a `PartialAlias` between `Loc1` and `Loc2`, is such that `Loc1 + Offset = Loc2`, whe
[AA] Correctly maintain the sign of PartiaAlias offset
Preserve the invariant that offset reported in the case of a `PartialAlias` between `Loc1` and `Loc2`, is such that `Loc1 + Offset = Loc2`, where `Loc1` and `Loc2` are the first and the second argument, respectively, in alias queries.
Differential Revision: https://reviews.llvm.org/D115927
show more ...
|
| #
a8c318b5 |
| 23-Oct-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Use index size instead of pointer size
When accumulating the GEP offset in BasicAA, we should use the pointer index size rather than the pointer size.
Differential Revision: https://revie
[BasicAA] Use index size instead of pointer size
When accumulating the GEP offset in BasicAA, we should use the pointer index size rather than the pointer size.
Differential Revision: https://reviews.llvm.org/D112370
show more ...
|
| #
c00e9c63 |
| 02-Nov-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Check known access sizes earlier (NFC)
All heuristics for variable accesses require both access sizes to be known, so check this once at the start, rather than for each particular heuristi
[BasicAA] Check known access sizes earlier (NFC)
All heuristics for variable accesses require both access sizes to be known, so check this once at the start, rather than for each particular heuristic.
show more ...
|
| #
0b6ed92c |
| 02-Nov-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Use early returns (NFC)
Reduce nesting in aliasGEP() a bit by returning early.
|
| #
51e9f336 |
| 29-Oct-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Use saturating multiply on range if nsw
If we know that the var * scale multiplication is nsw, we can use a saturating multiplication on the range (as a good approximation of an nsw multip
[BasicAA] Use saturating multiply on range if nsw
If we know that the var * scale multiplication is nsw, we can use a saturating multiplication on the range (as a good approximation of an nsw multiply). This recovers some cases where the fix from D112611 is unnecessarily strict. (This can be further strengthened by using a saturating add, but we currently don't track all the necessary information for that.)
This exposes an issue in our NSW tracking for multiplies. The code was assuming that (X +nsw Y) *nsw Z results in (X *nsw Z) +nsw (Y *nsw Z) -- however, it is possible that the distributed multiplications overflow, even if the non-distributed one does not. We should discard the nsw flag if the the offset is non-zero. If we just have (X *nsw Y) *nsw Z then concluding X *nsw (Y *nsw Z) is fine.
Differential Revision: https://reviews.llvm.org/D112848
show more ...
|
| #
cdf45f98 |
| 29-Oct-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Extract linear expression multiplication (NFC)
Extract a common method for multiplying a linear expression by a factor.
|
| #
7cf7378a |
| 29-Oct-2021 |
Nikita Popov <[email protected]> |
[BasicAA] Don't treat non-inbounds GEP as nsw
The scale multiplication is only guaranteed to be nsw if the GEP is inbounds (or the multiplication is trivial). Previously we were only considering exp
[BasicAA] Don't treat non-inbounds GEP as nsw
The scale multiplication is only guaranteed to be nsw if the GEP is inbounds (or the multiplication is trivial). Previously we were only considering explicit muls in GEP indices.
show more ...
|