[PATCH] D71177: [ValueTracking] Use the assumption that if the pointer was loaded/stored, then it is nonnull.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 00:40:39 PST 2019


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1933
+    PtrValueAddrSpace = V->getType()->getPointerAddressSpace();
+  }
   unsigned NumUsesExplored = 0;
----------------
I don't think this makes sense. Getting the address space is not expensive. You can just refetch it below.

Alternatively, if you really do want to extract it, then the whole NullPointerIsDefined check should be extracted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71177





More information about the llvm-commits mailing list