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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 23:06:53 PST 2019


jdoerfert added a comment.

In D70233#1746964 <https://reviews.llvm.org/D70233#1746964>, @uenoku wrote:

> I think reachability attribute is a good idea!
>
> > A Reachability abstract attribute answers the question "does execution at point A potentially reach point B". If this question is answered with false for all other uses of the value that might be captured, we know it is not *yet* captured and can continue with the noalias deduction. Currently, information AAReachability provides is completely pessimistic.
>
> At the starting point, it might be a good idea to use `AAIsDead` to determine that "does execution at point A **never**  reach point B" (because `AAIsDead` answers whether point B is dead).
>
> Btw, I think `AAIsDead` is a strict subset of `AAReachability`. If we have `AAReachability::isAssumedReachable(Instruction &From, Instruction &To)`, `AAIsDead::isAssumedDead(Instruction &I)` is equivalent to ``!AAReachability::isAssumedReachable(EntryPointOfFunction, I)`.So you should probably extend `AAIsDead`.
>
> Maybe you can refer `must-be-executed-context` which handles the similar property.


I agree and this is certainly an option. At the end of the day, it should not matter if we keep it separate or merge them, we can always use on from the other.
Let's get the class skeleton in place with the right methods etc and we take it step by step from there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70233





More information about the llvm-commits mailing list