[PATCH] D109219: [Intrinsics] Move dest arg functions of MemIntrinsicBase deeper in mem intrinsics hierarchy

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 17 00:25:28 PDT 2021


mkazantsev added a comment.

In D109219#3003348 <https://reviews.llvm.org/D109219#3003348>, @nikic wrote:

> In D109219#3003344 <https://reviews.llvm.org/D109219#3003344>, @mkazantsev wrote:
>
>> Is the provided motivation OK for this refactoring? It's generally good, and I don't really see reasons to hold it away.
>
> A remaining question I have is where the new `MemIntrinsic` would get actually used. The only commonality between current MemIntrinsics is that they have a destination -- accessing that destination is what MemIntrinsic is used for. After this change, it's not clear to me under what circumstances I could do something useful with `MemIntrinsic` that would not require a `MemWriteIntrinsic` (or a newly introduced `MemCmpIntrinsic`). The only thing `MemIntrinsic` tells me is that the intrinsic has "something to do with memory". Scrolling through this patch, there seems to be exactly one place where `MemIntrinsic` is being used (a volatile check) and that use could actually be replaced by `MemWriteIntrinsic` as well.

For example, we can LICM loop-invariant memory intrinsic if loop doesn't write.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109219



More information about the llvm-commits mailing list