[PATCH] D73785: [NFC] Introduce a type to model memory operation

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 07:31:12 PST 2020


gchatelet marked 2 inline comments as done.
gchatelet added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:110
+// MemOp models a memory operation, either memset or memcpy/memmove.
+struct MemOp {
+  // Shared
----------------
courbet wrote:
> gchatelet wrote:
> > arsenm wrote:
> > > Needs src and dst address spaces
> > So address spaces are useful at the `findOptimalMemOpLowering` level but not at lower levels (`getOptimalMemOpType`, `getOptimalMemOpLLT`) so I was not sure whether it would make sense to include them. I don't have a strong opinion at that point. courbet@ WDYT?
> Some operations (e.g. `getOptimalMemOpType`) do not take an address space.
@arsenm do you think it would make sense to propagate the address spaces down to the `TargetLowering` implementations? Is it //a bug// so to speak that we always consider address spaces to be compatible?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73785





More information about the llvm-commits mailing list