[PATCH] D112312: [DSE] Add OR_None (not for commit)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 03:00:42 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1012
+      if (AAR == AliasResult::NoAlias)
+        return OW_None;
       return OW_Unknown;
----------------
ebrevnov wrote:
> fhahn wrote:
> > ebrevnov wrote:
> > > fhahn wrote:
> > > > nikic wrote:
> > > > > Maybe move this check to the start?
> > > > I originally had the check just after getting `AAR`, but `isOverwrite` considers out-of-bounds writes killing other writes to the same underlying object, which would be missed by the early exit.
> > > Could you clarify which particular piece of code handles "out-of-bounds" case?
> > It is not handled explicitly and is a consequence of the code just below (lines 1017-1020). If the underlying object size matches the size of the out-of-bounds store, the out of bounds store is considered killing other stores to the same object. Note that this logic does not kick in, if the out-of-bounds store is smaller than the underlying object. I added such a test case in 9c00afe926e9
> Got it, thanks. Will update D105098 and add related comment.
That sounds great, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112312



More information about the llvm-commits mailing list