[PATCH] D109280: [WIP][DSE] Memory intrinsics like memset, memcpy, memmove are removed if they are overwritten by a store in a loop

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 00:25:58 PST 2022


fhahn added a comment.

In D109280#3292637 <https://reviews.llvm.org/D109280#3292637>, @vdsered wrote:

>> snip
>
> I think there are potential enhancements. For example, loop transformations shouldn't probably be done in this pass. It'd be probably better move this whole optimization into a specialized pass and run it closer to other loop passes in the default pipeline because loops'd be in the right form for free or loop deletion would remove loops that become empty after DSE and so on. However, I'm still not sure if this is a better idea than implementing it right here in DSE.

DSE shouldn't rotate loops, yes! Not sure if moving it to a separate pass is necessary to start with. The first set of loop optimizations should already be completed before DSE runs.

> Plus, it'd be good to see how this behaves on larger projects (LLVM itself and so on).

Sure. Another interesting data point would be the impact with variable auto-init enabled. Also, another motivating case was raised as issue https://github.com/llvm/llvm-project/issues/53473


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109280/new/

https://reviews.llvm.org/D109280



More information about the llvm-commits mailing list