[PATCH] D136526: [AAPointerInfo] refactor how offsets and Access objects are tracked

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 22 06:15:14 PDT 2022


sameerds created this revision.
Herald added subscribers: ormris, okura, jdoerfert, kuter, hiraditya.
Herald added a project: All.
sameerds requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Accesses resulting from instructions need to be maintained in two mappings.
This is now combined in a single data structure:

- one access per instruction
- a set of accesses per offset and size (called bins)

When AAPointer recomputes the offset for an instruction, it sets the value to
Unknown if the new offset is not the same at the old offset. The instruction
must now be removed from its current bin. This happens in particular with the
PHINode where different operands result in different offsets relative to the
same base pointer.

This fixes a bug instroduced in https://reviews.llvm.org/rGad98ef8be409


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136526

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp
  llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136526.469888.patch
Type: text/x-patch
Size: 30417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221022/ff38bcc7/attachment-0001.bin>


More information about the llvm-commits mailing list