[all-commits] [llvm/llvm-project] 25dad1: [DSE] Optimize defining access of defs while walki...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Sat Nov 27 05:05:22 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 25dad1064bf14b9a24c6e33ef4a9e7f8e951c1e3
https://github.com/llvm/llvm-project/commit/25dad1064bf14b9a24c6e33ef4a9e7f8e951c1e3
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-11-27 (Sat, 27 Nov 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Log Message:
-----------
[DSE] Optimize defining access of defs while walking upwards.
This patch extends the code that walks memory defs upwards to find
clobbering accesses to also try to optimize the clobbering defining
access.
We should be able to find set the optimized access of our starting def
(KillingDef), if the following holds:
1. It is the first call of getDomMemoryDef for KillingDef (so Current
== KillingDef->getDefiningAccess().
2. No potentially aliasing defs are skipped.
Then if a (partly) aliasing def is encountered, it can be used as
optimized access for KillingDef. No further optimizations can be
applied to KillingDef.
I'd appreciate a careful look, as the existing documentation is not too
clear on what is expected for optimized accesses.
The motivation for this patch is to use the optimized accesses to cover
more cases of redundant stores as follow-up to D111727.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D112313
More information about the All-commits
mailing list