[PATCH] D64876: [Attributor] Deduce "dereferenceable" attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 10:40:38 PDT 2019


jdoerfert added a comment.

Can you make sure this passes the llvm test suite when the Attributor is turned on?



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1377
+// Helper function that returns dereferenceable bytes.
+uint64_t calcDifferenceIfBaseIsNonNull(int64_t DerefBytes, int64_t Offset,
+                                       bool IsNonNull) {
----------------
make it `static`


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1386
+                                                                 Value &V) {
+  // TODO: Tracking the globally flag.
+
----------------
and the `nonnull` flag. Maybe add a parameter `bool &IsNonNull` and `bool &IsGlobal`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64876/new/

https://reviews.llvm.org/D64876





More information about the llvm-commits mailing list