[PATCH] D136164: [MemorySSA] Use BatchAA for clobber walker

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 01:25:05 PDT 2022


nikic added a comment.

In D136164#3900876 <https://reviews.llvm.org/D136164#3900876>, @asbirlea wrote:

> It seems unnecessary to force all uses to instantiate and pass the BatchAA.
> Can this remain part of the ClobberWalkerBase instead? Default the calls to getClobberingMemoryAccess to instantiate a BatchAA internally and pass to the ClobberWalker.
> Then, there can be an additional API added to override the above behavior when useful (known as safe): either passing a given BatchAA like current patch, or, keeping a BatchAA in the ClobberWalker itself instead of the AA, and being able to "set" it to not re-initialize it on each call (and perhaps "reset" to reseting each time).
> What do you think?

We currently have 17 calls to getClobberingMemoryAccess() and if my analysis is right, I believe 15 of those can reuse the BatchAA instance in //some// way (though this patch mostly doesn't do it). Given this, I think it makes more sense to always require BatchAA -- it makes reuse opportunities more obvious, and is not a particularly large burden if reuse is not possible. I'd agree if it were the other way around and BatchAA reuse was not possible in most cases.


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

https://reviews.llvm.org/D136164



More information about the llvm-commits mailing list