Revision tags: 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 |
|
#
f364b2ee |
| 13-Aug-2024 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[LLVM] Don't peek through bitcast on pointers and gep with zero indices. NFC. (#102889)
Since we are using opaque pointers now, we don't need to peek through
bitcast on pointers and gep with zero i
[LLVM] Don't peek through bitcast on pointers and gep with zero indices. NFC. (#102889)
Since we are using opaque pointers now, we don't need to peek through
bitcast on pointers and gep with zero indices.
show more ...
|
Revision tags: 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 |
|
#
175d2971 |
| 02-May-2024 |
Florian Hahn <flo@fhahn.com> |
[LoopUnroll] Add CSE to remove redundant loads after unrolling. (#83860)
This patch adds loadCSE support to simplifyLoopAfterUnroll. It is based
on EarlyCSE's implementation using ScopeHashTable an
[LoopUnroll] Add CSE to remove redundant loads after unrolling. (#83860)
This patch adds loadCSE support to simplifyLoopAfterUnroll. It is based
on EarlyCSE's implementation using ScopeHashTable and is using SCEV for
accessed pointers to check to find redundant loads after unrolling.
This applies to the late unroll pass only, for full unrolling those
redundant loads will be cleaned up by the regular pipeline.
The current approach constructs MSSA on-demand per-loop, but there is
still small but notable compile-time impact:
stage1-O3 +0.04%
stage1-ReleaseThinLTO +0.06%
stage1-ReleaseLTO-g +0.05%
stage1-O0-g +0.02%
stage2-O3 +0.09%
stage2-O0-g +0.04%
stage2-clang +0.02%
https://llvm-compile-time-tracker.com/compare.php?from=c089fa5a729e217d0c0d4647656386dac1a1b135&to=ec7c0f27cb5c12b600d9adfc8543d131765ec7be&stat=instructions:u
This benefits some workloads with runtime-unrolling disabled,
where users use pragmas to force unrolling, as well as with
runtime unrolling enabled.
On SPEC/MultiSource, this removes a number of loads after unrolling
on AArch64 with runtime unrolling enabled.
```
External/S...te/526.blender_r/526.blender_r 96
MultiSourc...rks/mediabench/gsm/toast/toast 39
SingleSource/Benchmarks/Misc/ffbench 4
External/SPEC/CINT2006/403.gcc/403.gcc 18
MultiSourc.../Applications/JM/ldecod/ldecod 4
MultiSourc.../mediabench/jpeg/jpeg-6a/cjpeg 6
MultiSourc...OE-ProxyApps-C/miniGMG/miniGMG 9
MultiSourc...e/Applications/ClamAV/clamscan 4
MultiSourc.../MallocBench/espresso/espresso 3
MultiSourc...dence-flt/LinearDependence-flt 2
MultiSourc...ch/office-ispell/office-ispell 4
MultiSourc...ch/consumer-jpeg/consumer-jpeg 6
MultiSourc...ench/security-sha/security-sha 11
MultiSourc...chmarks/McCat/04-bisect/bisect 3
SingleSour...tTests/2020-01-06-coverage-009 12
MultiSourc...ench/telecomm-gsm/telecomm-gsm 39
MultiSourc...lds-flt/CrossingThresholds-flt 24
MultiSourc...dence-dbl/LinearDependence-dbl 2
External/S...C/CINT2006/445.gobmk/445.gobmk 6
MultiSourc...enchmarks/mafft/pairlocalalign 53
External/S...31.deepsjeng_r/531.deepsjeng_r 3
External/S...rate/510.parest_r/510.parest_r 58
External/S...NT2006/464.h264ref/464.h264ref 29
External/S...NT2017rate/502.gcc_r/502.gcc_r 45
External/S...C/CINT2006/456.hmmer/456.hmmer 6
External/S...te/538.imagick_r/538.imagick_r 18
External/S.../CFP2006/447.dealII/447.dealII 4
MultiSourc...OE-ProxyApps-C++/miniFE/miniFE 12
External/S...2017rate/525.x264_r/525.x264_r 36
MultiSourc...Benchmarks/7zip/7zip-benchmark 33
MultiSourc...hmarks/ASC_Sequoia/AMGmk/AMGmk 2
MultiSourc...chmarks/VersaBench/8b10b/8b10b 1
MultiSourc.../Applications/JM/lencod/lencod 116
MultiSourc...lds-dbl/CrossingThresholds-dbl 24
MultiSource/Benchmarks/McCat/05-eks/eks 15
```
PR: https://github.com/llvm/llvm-project/pull/83860
show more ...
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3 |
|
#
37d6e5b7 |
| 01-Apr-2024 |
Vitaly Buka <vitalybuka@google.com> |
[memoryssa] Exclude llvm.allow.{runtime,ubsan}.check() (#86066)
RFC:
https://discourse.llvm.org/t/rfc-add-llvm-experimental-hot-intrinsic-or-llvm-hot/77641
|
Revision tags: 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 |
|
#
c52a8dcd |
| 25-Jan-2024 |
Kazu Hirata <kazu@google.com> |
[Analysis] Use llvm::pred_size (NFC)
|
Revision tags: 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 |
|
#
89fa0dd1 |
| 09-Aug-2023 |
Alina Sbirlea <asbirlea@google.com> |
[MemorySSA] Handle queries with empty memory location.
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
72e7e585 |
| 13-Jun-2023 |
Arthur Eubanks <aeubanks@google.com> |
[MemorySSA] Always perform MemoryUses liveOnEntry optimization on MSSA construction
Fixes invariant memory regressions in future DSE patches.
Also add a flag to print<memoryssa> to not ensure optim
[MemorySSA] Always perform MemoryUses liveOnEntry optimization on MSSA construction
Fixes invariant memory regressions in future DSE patches.
Also add a flag to print<memoryssa> to not ensure optimized uses to test this.
Noticeable compile time regression [1], but a future DSE change that depends on this more than makes up for it.
[1] https://llvm-compile-time-tracker.com/compare.php?from=9d5466849a770eeab222d5a5890376d3596e8ad6&to=95682dbe11d76a3342870437377216e96b167504&stat=instructions:u
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D152859
show more ...
|
#
eb3d21be |
| 13-Jun-2023 |
Arthur Eubanks <aeubanks@google.com> |
[Passes] Remove some legacy printer passes
MemDepPrinter doesn't have a new PM equivalent, but MemDep is soft deprecated anyway and adding one should be easy if somebody wants to.
|
Revision tags: 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 |
|
#
8ed6c922 |
| 25-Feb-2023 |
J. Ryan Stinnett <jryans@gmail.com> |
[DebugInfo] Remove `dbg.addr` from Analysis
Part of `dbg.addr` removal Discussed in https://discourse.llvm.org/t/what-is-the-status-of-dbg-addr/62898
Differential Revision: https://reviews.llvm.org
[DebugInfo] Remove `dbg.addr` from Analysis
Part of `dbg.addr` removal Discussed in https://discourse.llvm.org/t/what-is-the-status-of-dbg-addr/62898
Differential Revision: https://reviews.llvm.org/D144799
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
98ffc7b1 |
| 12-Jan-2023 |
luxufan <luxufan@iscas.ac.cn> |
[MemorySSA] Don't check def set when cloning memoryaccesses
For internal functions, globals-aa returns different ModRefInfo results if they are inlined and are no longer called by external functions
[MemorySSA] Don't check def set when cloning memoryaccesses
For internal functions, globals-aa returns different ModRefInfo results if they are inlined and are no longer called by external functions. This causes an assertion failure when cloning memoryssa accesses.
Fixes: https://github.com/llvm/llvm-project/issues/59546
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D141185
show more ...
|
Revision tags: llvmorg-15.0.7 |
|
#
c08fad81 |
| 20-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Remove redundant initialization of std::optional (NFC)
|
#
6eb0b0a0 |
| 15-Dec-2022 |
Kazu Hirata <kazu@google.com> |
Don't include Optional.h
These files no longer use llvm::Optional.
|
#
d4b6fcb3 |
| 14-Dec-2022 |
Fangrui Song <i@maskray.me> |
[Analysis] llvm::Optional => std::optional
|
#
405fc404 |
| 07-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[ADT] Don't including None.h (NFC)
These source files no longer use None, so they do not need to include None.h.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://
[ADT] Don't including None.h (NFC)
These source files no longer use None, so they do not need to include None.h.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
48edb906 |
| 05-Dec-2022 |
Nikita Popov <npopov@redhat.com> |
[MemorySSA] Use BatchAA for clobber walker
While MemorySSA use optimization was already using BatchAA, the publicly exposed MSSA walkers were using plain AAResults. This is not great, because it is
[MemorySSA] Use BatchAA for clobber walker
While MemorySSA use optimization was already using BatchAA, the publicly exposed MSSA walkers were using plain AAResults. This is not great, because it is expected that clobber walking will make repeated AA queries.
This patch makes the clobber API accept a BatchAAResults instance. The plain APIs are kept as wrappers and will create a BatchAAResults instance for the duration of the query. In the future, the explicit BatchAAResults arguments will be used to share AA results across queries, not just within one query.
Differential Revision: https://reviews.llvm.org/D136164
show more ...
|
#
3c09ed00 |
| 05-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use std::nullopt instead of None in comments (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalu
[llvm] Use std::nullopt instead of None in comments (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
19aff0f3 |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[Analysis] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount o
[Analysis] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
Revision tags: llvmorg-15.0.6 |
|
#
55378ae8 |
| 28-Nov-2022 |
Kazu Hirata <kazu@google.com> |
[Analysis] Remove unused fields in MemorySSA.cpp (NFC)
The last uses of AR were removed on July 28, 2022 in commit f96ea53e892e0dfc1ee778868c1ed33616b95a82.
Differential Revision: https://reviews.l
[Analysis] Remove unused fields in MemorySSA.cpp (NFC)
The last uses of AR were removed on July 28, 2022 in commit f96ea53e892e0dfc1ee778868c1ed33616b95a82.
Differential Revision: https://reviews.llvm.org/D138730
show more ...
|
#
3053a323 |
| 17-Nov-2022 |
luxufan <luxufan@iscas.ac.cn> |
[MemorySSA] Relax assert condition in createDefinedAccess
If globals-aa is enabled, because of the deletion of memory instructions, there may be call instruction that is not in ModOrRefSet but is a
[MemorySSA] Relax assert condition in createDefinedAccess
If globals-aa is enabled, because of the deletion of memory instructions, there may be call instruction that is not in ModOrRefSet but is a MemoryUseOrDef. This causes the crash in the process of cloning uses and defs.
Fixes https://github.com/llvm/llvm-project/issues/58719
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D137553
show more ...
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
01859da8 |
| 24-Oct-2022 |
Patrick Walton <pcwalton@fb.com> |
[AliasAnalysis] Introduce getModRefInfoMask() as a generalization of pointsToConstantMemory().
The pointsToConstantMemory() method returns true only if the memory pointed to by the memory location i
[AliasAnalysis] Introduce getModRefInfoMask() as a generalization of pointsToConstantMemory().
The pointsToConstantMemory() method returns true only if the memory pointed to by the memory location is globally invariant. However, the LLVM memory model also has the semantic notion of *locally-invariant*: memory that is known to be invariant for the life of the SSA value representing that pointer. The most common example of this is a pointer argument that is marked readonly noalias, which the Rust compiler frequently emits.
It'd be desirable for LLVM to treat locally-invariant memory the same way as globally-invariant memory when it's safe to do so. This patch implements that, by introducing the concept of a *ModRefInfo mask*. A ModRefInfo mask is a bound on the Mod/Ref behavior of an instruction that writes to a memory location, based on the knowledge that the memory is globally-constant memory (in which case the mask is NoModRef) or locally-constant memory (in which case the mask is Ref). ModRefInfo values for an instruction can be combined with the ModRefInfo mask by simply using the & operator. Where appropriate, this patch has modified uses of pointsToConstantMemory() to instead examine the mask.
The most notable optimization change I noticed with this patch is that now redundant loads from readonly noalias pointers can be eliminated across calls, even when the pointer is captured. Internally, before this patch, AliasAnalysis was assigning Ref to reads from constant memory; now AA can assign NoModRef, which is a tighter bound.
Differential Revision: https://reviews.llvm.org/D136659
show more ...
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
17994ed9 |
| 07-Sep-2022 |
Nikita Popov <npopov@redhat.com> |
[MemorySSA] Remove PerformedPhiTranslation flag
I believe this is no longer necessary, as the underlying problem has been fixed in a different way: Nowadays, we will adjust the location size to befo
[MemorySSA] Remove PerformedPhiTranslation flag
I believe this is no longer necessary, as the underlying problem has been fixed in a different way: Nowadays, we will adjust the location size to beforeOrAfterPointer() if the pointer is not loop invariant. This makes merging results translated across loop backedges safe.
The two tests in phi-translation.ll show an improvement while still being correct: The loads in the loop no longer alias with noalias pointers, but still alias with the store in the entry block (which they originally did not -- this is the bug that PerformedPhiTranslation originally fixed).
Differential Revision: https://reviews.llvm.org/D133404
show more ...
|
#
bfd31c6f |
| 19-Sep-2022 |
luxufan <luxufan@iscas.ac.cn> |
[MemorySSA][NFC] Use const whenever possible
Differential Revision: https://reviews.llvm.org/D134162
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
34683c3e |
| 01-Aug-2022 |
Nikita Popov <npopov@redhat.com> |
[MSSA] Fix expensive checks build
|
Revision tags: llvmorg-15.0.0-rc1 |
|
#
f96ea53e |
| 28-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[AA] Do not track Must in ModRefInfo
getModRefInfo() queries currently track whether the result is a MustAlias on a best-effort basis. The only user of this functionality is the optimized memory acc
[AA] Do not track Must in ModRefInfo
getModRefInfo() queries currently track whether the result is a MustAlias on a best-effort basis. The only user of this functionality is the optimized memory access type in MemorySSA -- which in turn has no users. Given that this functionality has not found a user since it was introduced five years ago (in D38862), I think we should drop it again.
The context is that I'm working to separate FunctionModRefBehavior to track mod/ref for different location kinds (like argmem or inaccessiblemem) separately, and the fact that ModRefInfo also has an unrelated Must flag makes this quite awkward, especially as this means that NoModRef is not a zero value. If we want to retain the functionality, I would probably split getModRefInfo() results into a part that just contains the ModRef information, and a separate part containing a (best-effort) AliasResult.
Differential Revision: https://reviews.llvm.org/D130713
show more ...
|
Revision tags: llvmorg-16-init |
|
#
a81b64a1 |
| 26-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use Optional::has_value instead of Optional::hasValue (NFC)
This patch replaces x.hasValue() with x.has_value() where x is not contextually convertible to bool.
|
#
a7938c74 |
| 26-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Don't use Optional::hasValue (NFC)
This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only.
|