[PATCH] D83246: [Attributor] use liveness information from AAIsDead in AAReachability and cache query results

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 15:53:46 PDT 2020


jdoerfert added a comment.

In D83246#2143962 <https://reviews.llvm.org/D83246#2143962>, @okura wrote:

> On second thoughts, I think so too about the licenses check.
>  Could you tell me where you think we can use the liveness information in this comment <https://reviews.llvm.org/D76210#1929521>?


Right. What I meant is we should use liveness when computing the entire reachability result, not only the endpoints. We can (reasonably) expect users to do the latter (for now).
If we compute reachability ourselves it is a different story as we can use the liveness of edges (eventually) to improve the result.



================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:729
+    return Result;
+  }
+
----------------
okura wrote:
> jdoerfert wrote:
> > Please add documentation and consider taking the instructions as references.
> > 
> > Nit: Move `F` after the first check to shorten the lifetime (and avoid confusion).
> > 
> Do you expect that I change interfaces of AAReachability to take instructions as references too?
> Could you tell me the advantage of taking as references compared to taking as pointers? I don't mean I want to stick to pointers, just want to know about it.
Yes, feel free to change the other interface as well.

There is no(t much) "functional benefit". In the Attributor we usually use references whenever we cannot pass `null` and pointers when we might (or have to use pointers). At the end of the day it is just a hint for the user that nullptr is not acceptable.


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

https://reviews.llvm.org/D83246





More information about the llvm-commits mailing list