llvm-project/llvm/test/Transforms/Attributor
Sameer Sahasrabuddhe 376d0469b9 [AAPointerInfo] refactor how offsets and Access objects are tracked
This restores commit b756096b0c, which was
originally reverted in 00b09a7b18.

AAPointerInfo now maintains a list of all Access objects that it owns, along
with the following maps:

- OffsetBins: OffsetAndSize -> { Access }
- InstTupleMap: RemoteI x LocalI -> Access

A RemoteI is any instruction that accesses memory. RemoteI is different from
LocalI if and only if LocalI is a call; then RemoteI is some instruction in the
callgraph starting from LocalI.

Motivation: When AAPointerInfo recomputes the offset for an instruction, it sets
the value to Unknown if the new offset is not the same as the old offset. The
instruction must now be moved from its current bin to the bin corresponding to
the new offset. This happens for example, when:

- A PHINode has operands that result in different offsets.
- The same remote inst is reachable from the same local inst via different paths
  in the callgraph:

```
               A (local inst)
               |
               B
              / \
             C1  C2
              \ /
               D (remote inst)

```
This fixes a bug where a store is incorrectly eliminated in a lit test.

Reviewed By: jdoerfert, ye-luo

Differential Revision: https://reviews.llvm.org/D136526
2022-11-15 18:52:11 +05:30
..
ArgumentPromotion [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
IPConstantProp [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
reduced [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
align.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
allow_list.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
alwaysinline.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
assumes_info.ll [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
call-simplify-pointer-info.ll [AAPointerInfo] refactor how offsets and Access objects are tracked 2022-11-15 18:52:11 +05:30
callbacks.ll [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
callgraph.ll
cb_liveness_disabled.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
cb_liveness_enabled.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
cb_range_disabled.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
cb_range_enabled.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
cgscc_bugs.ll [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
chain.ll [NFC][1/n] Remove -enable-new-pm=0 flags from lit tests 2022-09-19 09:57:37 -07:00
depgraph.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
dereferenceable-1.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
dereferenceable-2-inseltpoison.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
dereferenceable-2.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
heap_to_stack.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
heap_to_stack_gpu.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
internal-noalias.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
internalize.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
lit.local.cfg
liveness.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
liveness_chains.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
lowerheap.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
lvi-after-jumpthreading.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
lvi-for-ashr.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
memory_locations.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
misc.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
misc_crash.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
new_attributes.ll
noalias.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nocapture-1.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nocapture-2.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nodelete.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nofree.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nonnull.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
norecurse.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
noreturn.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
noreturn_async.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
noreturn_sync.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
nosync.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
noundef.ll [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
nounwind.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
openmp_parallel.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
pointer-info.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
potential.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
range.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
reachability.ll [Attribute] Clean up test prefixes (NFC) 2022-09-23 11:08:11 +02:00
read_write_returned_arguments_scc.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
readattrs.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
returned.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
undefined_behavior.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-assume.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-dbg.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-gpu.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-instances.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-local-remote.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-pointer-info-struct.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
value-simplify-pointer-info.ll [AAPointerInfo] refactor how offsets and Access objects are tracked 2022-11-15 18:52:11 +05:30
value-simplify.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
willreturn.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
wrapper.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00