[PATCH] Update users of allowsUnalignedMemoryAccesses to pass the address space

Quentin Colombet qcolombet at apple.com
Fri Jan 24 10:18:12 PST 2014


  Hi Matt,

  This LGTM.

  I just have a small question, see the inline comments.

  Thanks,
  -Quentin


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3627
@@ -3626,3 +3626,3 @@
   if (VT == MVT::Other) {
-    if (DstAlign >= TLI.getDataLayout()->getPointerPrefAlignment() ||
-        TLI.allowsUnalignedMemoryAccesses(VT)) {
+    unsigned AS = 0;
+    if (DstAlign >= TLI.getDataLayout()->getPointerPrefAlignment(AS) ||
----------------
Instead of using the default address space here, shouldn't we add a parameter to FindOptimalMemOpLowering?
That said, I don’t think it is possible to specify the address space for a memcpy/memset, thus I am fine with that… just asking :). 

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:3686
@@ -3684,2 +3685,3 @@
       bool Fast;
+      unsigned AS = 0;
       if (NumMemOps && AllowOverlap &&
----------------
Same here.


http://llvm-reviews.chandlerc.com/D2609



More information about the llvm-commits mailing list