[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 08:29:22 PST 2020
gchatelet marked an inline comment 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
----------------
gchatelet wrote:
> 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?
Upon careful analysis, only `DstAS` is used as a fallback in case we don't have an optimal type to use so I don't think it matters to pass them down.
Also `SrcAs` is unused in both function so I'll create a subsequent patch to remove this argument. Thx for the heads up though @arsenm .
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