[ScopInfo] Completely remove MemoryAccesses when their parent statement is removed.
commit85ca8eda962a73732d6e19e24c779b661cdcd55b
authorMichael Kruse <llvm@meinersbur.de>
Mon, 9 Apr 2018 23:13:05 +0000 (9 23:13 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 9 Apr 2018 23:13:05 +0000 (9 23:13 +0000)
treedc47949ead92d83b221ddd50f5f4921f9281fb94
parentf6cf07ed115f9f354f7dfc0064eaa446dae22608
[ScopInfo] Completely remove MemoryAccesses when their parent statement is removed.

Removing a statement left its MemoryAccesses in some lists and maps of
the SCoP.  Which lists depends on at which phase of the SCoP
construction the statement is deleted.  Follow-up passes could still see
the already deleted MemoryAccesses by iterating through these
lists/maps, resulting in an access violation.

When removing a ScopStmt, also remove all its MemoryAccesses by using
the same mechnism that removes a MemoryAccess.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@329640 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/ScopInfo.h
lib/Analysis/ScopInfo.cpp
test/ScopInfo/stmt_with_read_but_without_sideffect.ll [new file with mode: 0644]