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

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 07:03:11 PST 2020


courbet 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:
> 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.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:2679
     SDLoc dl(Op);
-    return DAG.getNode(
-        ISD::FP_ROUND, dl, MVT::f16,
-        DAG.getNode(Op.getOpcode(), dl, MVT::f32, SrcVal),
-        DAG.getIntPtrConstant(0, dl));
+    return DAG.getNode(ISD::FP_ROUND, dl, MVT::f16,
+                       DAG.getNode(Op.getOpcode(), dl, MVT::f32, SrcVal),
----------------
spurious reformatting, can you please revert this to facilitate the review ?


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