[PATCH] D73428: [Attributor] Improve `noalias` deduction based on memory information

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 03:50:17 PST 2020


uenoku added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2769
+  /// potential aliases to the underlying call site argument. That is, if the
+  /// call site argument does not alias any argument or global which is accessed
+  /// by the callee it can be marked noalias.
----------------
baziotis wrote:
> uenoku wrote:
> > Don't we need to look at constant memories?
> So, no malloced memory?
I think malloced memory cannot be seen from the caller so we don't have to care about here.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2924
+        AAMemoryLocation::ALL_LOCATIONS | AAMemoryLocation::NO_LOCAL_MEM |
+        AAMemoryLocation::NO_INACCESSIBLE_MEM;
+
----------------
baziotis wrote:
> uenoku wrote:
> > How about `NO_MALLOCED_MEM`?
> > 
> Why not check for malloced memory? Although I think this goes along with your comment about constant memories.
I think malloced mem cannot be accessed from the caller but constant memory can be accessed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73428





More information about the llvm-commits mailing list