SROA: Remove pointer from visited along with instruction
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 1 Jun 2020 21:35:12 +0000 (14:35 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 5 Jun 2020 19:47:23 +0000 (12:47 -0700)
commit1e9a0a4e04aa66f048ba791e25d32ce8c02a20a4
treefe5cde1702cc99b64bad5e4fb90efbeaccf63de7
parent8a8c6913a931e8bbd119012f4badd81155a0f48a
SROA: Remove pointer from visited along with instruction

If an instruction is erased we also need to remove it from
Visited set. There is a very small chance that an another
newly created instruction will be created with the same
pointer value in place of an erased one.

Differential Revision: https://reviews.llvm.org/D80958
llvm/lib/Transforms/Scalar/SROA.cpp