[PATCH] D70233: [WIP][NOT FOR COMMIT][Attributor] AAReachability Attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 13:04:11 PST 2019


jdoerfert added a comment.

In D70233#1748026 <https://reviews.llvm.org/D70233#1748026>, @pgode wrote:

> @jdoerfert Thank you suggesting the corrections.  
>  Updating the corrected patch.


I think you still need to remove the other files from the patch, then it will be good to go in.
I'll accept the patch ones it is updated.

Btw., do you have commit access?

> I think, function getAsStr() should be returning 'from' and 'to' position, but for that we need to store the From and To. 
>  For now, I am returning 'reachable' by default.

That is fine for now. We do not have a concept of "attribute for pairs". Instead AAReachability is more like a container that computes and caches queries. You can return the number of cached queries in the getAsStr(), similar to what AAHeapToStack does.

---

Next step is to use AANoReachable at the capture todo we talked about. Even if it is captured, we can iterate over all uses of the pointer, skip the one in the call site we are looking at, and if the call site is not reachable from any of the uses, we can allow noalias still. Does that make sense?



================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:1698
+    return true;
+  }
+
----------------
Nit Please update the comments of the functions.


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

https://reviews.llvm.org/D70233





More information about the llvm-commits mailing list