With three reachability related AAs things got complicated. D106720
introduced features that did not work properly as we could add new
queries after a fixpoint was reached and which could not be answered by
the information gathered up to the fixpoint alone.
This patch merges D106720 and AACallEdges to simplify the situation.
It also moves the "backwards" reachability out of D106720 and into
AA::isPotentiallyReachable. In addition to avoiding the fixpoint issue
described above, the new scheme allows to track reachability in one
place only. We do not have to redo work for backwards queries as the
caller already caches reachability. Asking the caller explicitly is the
right way to go here.
To test inter-procedural reachability in a reasonable way this patch
includes also an extension to AAPointerInfo::forallInterferingWrites.
Basically, we can exclude writes if they cannot reach a load "during the
lifetime" of the allocation. That is, we need to go up the call graph to
determine reachability until we can determine the allocation would be
dead in the caller. See value-simplify-pointer-info-gpu.ll.
Note: The new code contains plenty debug output to determine how
reachability queries are resolved.
This class was removed. Replacement is just std::vector<AACallGraphNode*>::iterator.