[PATCH] D72562: [Attributor][Fix] AAHeapToStack and AAIsDead connection

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 12:44:35 PST 2020


jdoerfert added a comment.

In D72562#1847774 <https://reviews.llvm.org/D72562#1847774>, @sstefan1 wrote:

> In D72562#1841417 <https://reviews.llvm.org/D72562#1841417>, @sstefan1 wrote:
>
> > In D72562#1837865 <https://reviews.llvm.org/D72562#1837865>, @jdoerfert wrote:
> >
> > > This needs to be integrated with D73313 <https://reviews.llvm.org/D73313>.
> >
> >
> > I think there is no integration with D73313 <https://reviews.llvm.org/D73313> since I only need to change `AAIsDeadFunction::IsAssumedDead`. If that is correct I think this doesn't depend on D73313 <https://reviews.llvm.org/D73313>.
> >
> > Also, I'll drop the changes to the existing interfaces, e.g. `CheckForAllXXX`.
> >
> > In D72562#1837865 <https://reviews.llvm.org/D72562#1837865>, @jdoerfert wrote:
> >
> > > I suggest we ask H2M if we have a call explicitly if it assumes to remove it.
> >
> >
> > That is kind of the current implementation, but I'll change it a bit so the changes to existing interfaces are not needed.
>
>
> I was wrong. Currently we ask h2s for all mallocs that are to be deleted and mark them and their respective free calls dead. However, for some attributes (e.g. h2s) we need a way to skip checking whether or not malloc is dead (that is, if h2s marked it to be deleted). Back then the best way to do this seemed to be `CheckInstSeparately` flag. Could you give another look at the implementation in this patch?


I was hoping that after D73313 <https://reviews.llvm.org/D73313> we could have a check this in `AAIsDeadCallSiteReturned`. In the init and update we ask H2S (and later others) if they assume to remove the instruction, if so, we consider it dead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72562/new/

https://reviews.llvm.org/D72562





More information about the llvm-commits mailing list