[PATCH] D40670: Let Alloca treated as nonnull for any alloca addr space value

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 13:44:12 PST 2017


arsenm added inline comments.


================
Comment at: lib/Analysis/ValueTracking.cpp:1864
+    // Alloca never returns null.
+    if (isa<AllocaInst>(V))
       return true;
----------------
rampitec wrote:
> What was the original comment about? Is there a chance alloca can be used for malloc?
No, the lifetime of the alloca ends when the function does which wouldn't work for malloc


https://reviews.llvm.org/D40670





More information about the llvm-commits mailing list