[PATCH] D112313: [DSE] Optimize defining access of defs while walking upwards.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 31 11:09:58 PDT 2021


nikic added a comment.

In D112313#3088714 <https://reviews.llvm.org/D112313#3088714>, @fhahn wrote:

> In D112313#3085784 <https://reviews.llvm.org/D112313#3085784>, @nikic wrote:
>
>> Conversely, if another pass runs after DSE and uses the caching walker, it will now return the access optimized by DSE, but will it always be the same as the one produced by the walker?
>
> I *think* the patch should only set the optimized access *if* we hit a 'guaranteed' write-clobber, so this should be the 'nearest' dominating write-clobber. It intentionally does not set the optimized access for mem-phis or non-aliasing writes. I think this should be consistent with the walker as we only set the optimized access if it could not be skipped by the walker. That is modulo differences in the AA interpretation used between the walker and `isOverwrite`.

Right. For example DSE uses the earliest escape analysis, so it may find and cache a better (i.e. more dominating) clobber than the walker usually would.

Maybe it's okay. Would be great for @asbirlea to chime in.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112313



More information about the llvm-commits mailing list