[PATCH] D78932: [DSE,MSSA] Relax post-dom restriction for objs visible after return.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 10:11:25 PDT 2020


fhahn added a comment.

In D78932#2008860 <https://reviews.llvm.org/D78932#2008860>, @efriedma wrote:

> postdominance should work with invokes.  I was thinking more of plain calls that unwind.  But now I'm remembering: MemorySSA treats a potentially throwing call as a read of the value, even if the call itself can't actually read the value.  But still, the new code isn't consistent with the mayThrowBetween() check. I forget the end result of the discussion of whether we still need that check at all.


I've pushed additional tests for that scenario (e018b8bbb0ba <https://reviews.llvm.org/rGe018b8bbb0ba8ac1bb36931827c2fbc3ec31c1da>).

mayThrowInBetween is needed for cases where we have may throw functions marked as read none.  Those won't be part of MemorySSA and the extra check is needed. We have to ensure that there are no throws between any of the killing blocks. mayThrowInBetween currently conservatively returns true if there are any throwing blocks, so for now it should be fine. If mayThrowInBetween gets more powerful in the future, we have to make sure all killing blocks are checked. I can add a TODO.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78932





More information about the llvm-commits mailing list