diff options
author | Philip Reames <listmail@philipreames.com> | 2021-12-17 13:41:25 -0800 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-12-17 13:42:36 -0800 |
commit | a8a51fe55649f5e07f9f2973507dc20bc4e40765 (patch) | |
tree | d886141b1bb5d8ca1755a4b4c7419765633d4d7f /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 4f90e67e2f0f3718b4195813caf5e00677c4813d (diff) | |
download | llvm-a8a51fe55649f5e07f9f2973507dc20bc4e40765.zip llvm-a8a51fe55649f5e07f9f2973507dc20bc4e40765.tar.gz llvm-a8a51fe55649f5e07f9f2973507dc20bc4e40765.tar.bz2 |
[DSE] Remove calls with known writes to dead memory
The majority of this change is sinking logic from instcombine into MemoryLocation such that it can be generically reused. If we have a call with a single analyzable write to an argument, we can treat that as-if it were a store of unknown size.
Merging the code in this was unblocks DSE in the store to dead memory code paths. In theory, it should also enable classic DSE of such calls, but the code appears to not know how to use object sizes to refine unknown access bounds (yet).
In addition, this does make the isAllocRemovable path slightly stronger by reusing the libfunc and additional intrinsics bits which are already in getForDest.
Differential Revision: https://reviews.llvm.org/D115904
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
0 files changed, 0 insertions, 0 deletions