[ScopInfo] Completely remove MemoryAccesses when their parent statement is removed.
authorMichael Kruse <llvm@meinersbur.de>
Mon, 9 Apr 2018 23:13:05 +0000 (23:13 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 9 Apr 2018 23:13:05 +0000 (23:13 +0000)
commit192e7f72cae7f41b90f260f9fda334cd777e6ad6
tree25b887724561f7e7f4ef488d08fe6ecd1be5956c
parent7de61668aedf4ac986a303a34aba98a452c6abef
[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.

llvm-svn: 329640
polly/include/polly/ScopInfo.h
polly/lib/Analysis/ScopInfo.cpp
polly/test/ScopInfo/stmt_with_read_but_without_sideffect.ll [new file with mode: 0644]