[PATCH] Introduce print-memderefs to test isDereferenceablePointer

Philip Reames listmail at philipreames.com
Fri Jan 30 10:24:39 PST 2015


LGTM.

For future reference, I read your comment "Split print-memderefs into its own change." as meaning that you'd split the MemDerefPrinter into a separate review thread.  Since the original semantic change (which I thought was this thread) was blocked on that, I deleted the email without looking further.


================
Comment at: lib/Analysis/MemDerefPrinter.cpp:48
@@ +47,3 @@
+      Value *PO = LI->getPointerOperand();
+      if (PO->isDereferenceablePointer(nullptr))
+        Vec.push_back(PO);
----------------
It would be better to get the data layout if available and use it here.  You'll get far more precise results.  

(This can be separate change if desired.)

http://reviews.llvm.org/D7075

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list