llvm-project/llvm/test/Transforms/Attributor
Johannes Doerfert a265cf22af [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs
To make usage easier (compared to the many reachability related AAs),
this patch introduces a helper API, `AA::isPotentiallyReachable`, which
performs all the necessary steps. It also does the "backwards"
reachability (see D106720) as that simplifies the AA a lot (backwards
queries were somewhat different from the other query resolvers), and
ensures we use cached values in every stage.

To test inter-procedural reachability in a reasonable way this patch
includes 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. This leads to new constant propagations (through
memory) in `value-simplify-pointer-info-gpu.ll`.

Note: The new code contains plenty debug output to determine how
reachability queries are resolved.

Parts extracted from D110078.

Differential Revision: https://reviews.llvm.org/D118673
2022-02-01 01:40:45 -06:00
..
ArgumentPromotion [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
IPConstantProp [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
reduced [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
align.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
allow_list.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
alwaysinline.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
assumes_info.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
callbacks.ll [Attributor] Make interprocedural value explicit in genericValueTraversal 2022-02-01 01:40:44 -06:00
callgraph.ll Attributor: Fix crash on undef in !callees 2021-09-14 19:49:34 -04:00
cb_liveness_disabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_liveness_enabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_range_disabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cb_range_enabled.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
cgscc_bugs.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
chain.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
depgraph.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
dereferenceable-1.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
dereferenceable-2-inseltpoison.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
dereferenceable-2.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
heap_to_stack.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
heap_to_stack_gpu.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
internal-noalias.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
internalize.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lit.local.cfg
liveness.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
liveness_chains.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lowerheap.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
lvi-after-jumpthreading.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
lvi-for-ashr.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
memory_locations.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
misc.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
misc_crash.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
new_attributes.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
noalias.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
nocapture-1.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nocapture-2.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nodelete.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nofree.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
nonnull.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
norecurse.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
noreturn.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
noreturn_async.ll [Attributor] Make interprocedural value explicit in genericValueTraversal 2022-02-01 01:40:44 -06:00
noreturn_sync.ll [Attributor][FIX] Liveness handling in the isAssumedDead helpers 2022-02-01 01:18:52 -06:00
nosync.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
noundef.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
nounwind.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
openmp_parallel.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
potential.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
range.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
read_write_returned_arguments_scc.ll [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
readattrs.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
returned.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
undefined_behavior.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
value-simplify-gpu.ll [Attributor] Introduce the `AA::isPotentiallyReachable` helper APIs 2022-02-01 01:40:45 -06:00
value-simplify-instances.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
value-simplify-pointer-info.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
value-simplify.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00
willreturn.ll [Attributor] Use AAFunctionReachability to determine AANoRecurse 2022-02-01 01:40:44 -06:00
wrapper.ll [Attributor] Introduce the concept of query AAs 2022-02-01 01:40:44 -06:00