[PATCH] D34467: [SelectionDAG] set dereferenceable flag when expanding memcpy/memmove

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 12:09:12 PDT 2017


hfinkel added inline comments.


================
Comment at: lib/CodeGen/MachineInstr.cpp:576
+  // to specify the size and offset for isDereferenceablePointer.
+  unsigned PtrSize = DL.getPointerSize();
+  SmallVector<Value*, 1> Idxs;
----------------
Creating temporary instructions in helper functions is something we try very hard not to do. Please don't do it here.

The underlying isDereferenceableAndAlignedPointer implementation function in lib/Analysis/Loads.cpp actually takes a size. Feel free to expose an interface directly to that functionality if necessary.



https://reviews.llvm.org/D34467





More information about the llvm-commits mailing list