[AAUnderlyingObjects] Introduce an AA for getting underlying objects of a pointer
authorShilei Tian <i@tianshilei.me>
Sun, 8 Jan 2023 21:45:42 +0000 (16:45 -0500)
committerShilei Tian <i@tianshilei.me>
Sun, 8 Jan 2023 21:45:50 +0000 (16:45 -0500)
commitacd22b275131a965f4a6006dfa0b237ed6b6572e
treed0dd11e4e1e5b7ff717562c9a7624dab92a8686f
parent496f9a7d8d4b61b6f5dfa21e2614043a2b27cf67
[AAUnderlyingObjects] Introduce an AA for getting underlying objects of a pointer

This patch introduces a new AA `AAUnderlyingObjects`. It is basically like a wrapper
AA of the function `AA::getAssumedUnderlyingObjects`, but it can recursively do
query if the underlying object is an indirect access, such as a phi node or a select
instruction.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D141164
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
llvm/test/Transforms/Attributor/depgraph.ll
llvm/test/Transforms/Attributor/value-simplify-gpu.ll
llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll