[PATCH] D141164: [AAUnderlyingObjects] Introduce an AA for getting underlying objects of a pointer
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 7 19:47:37 PST 2023
jdoerfert added a comment.
Run test update script please so we can verify nothing broke.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11289
+ ? InterAssumedUnderlyingObjects
+ : IntraAssumedUnderlyingObjects;
+ for (Value *Obj : AssumedUnderlyingObjects)
----------------
tianshilei1992 wrote:
> jdoerfert wrote:
> > Scope can be Any. Use Intra for Intra and Inter otherwise. Maybe track what was requested so you don't eagerly compute both?
> `forallUnderlyingObjects` will be called after the execution of AA. We don't know the scope when we create the AA. Maybe we want to have something like the following?
> ```
> template <AA::ValueScope Scope>
> struct AAUnderlyingObjects {
> // ...
> };
>
> using AAIntraUnderlyingObjects = AAUnderlyingObjects<AA::Intraprocedural>;
> using AAInterUnderlyingObjects = AAUnderlyingObjects<AA::Interprocedural>;
> using AAAnyUnderlyingObjects = AAUnderlyingObjects<AA::Any>;
> ```
Leave it as is for now. Technically you can make it a queryAA and allow users to ask for something and we basically only update after they queried. For now this is fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141164/new/
https://reviews.llvm.org/D141164
More information about the llvm-commits
mailing list