[GVNHoist] Prune out useless CHI insertions
authorAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Tue, 28 Aug 2018 11:07:54 +0000 (11:07 +0000)
committerAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Tue, 28 Aug 2018 11:07:54 +0000 (11:07 +0000)
commit484bd13e2d40c780ddba2362ca5b43f65de7fa3f
treebf2194169fa4a49d8415eaabbd00b4524d14a0af
parent99fc18c387a9c4bc0abd1567c31e08278c7b8613
[GVNHoist] Prune out useless CHI insertions

Fix for the out-of-memory error when compiling SemaChecking.cpp
with GVNHoist and ubsan enabled. I've used a cache for inserted
CHIs to avoid excessive memory usage.

Differential Revision: https://reviews.llvm.org/D50323

llvm-svn: 340818
llvm/lib/Transforms/Scalar/GVNHoist.cpp