[LICM] Reapply r347776 "Make LICM able to hoist phis" with fix
authorJohn Brawn <john.brawn@arm.com>
Thu, 29 Nov 2018 17:10:00 +0000 (17:10 +0000)
committerJohn Brawn <john.brawn@arm.com>
Thu, 29 Nov 2018 17:10:00 +0000 (17:10 +0000)
commita7eb2c863fa9c55ee60f37a4ad6846cd2bbeec67
treea18ad63271cda6fa6c3d0438f6c9ba2fe3d85158
parent8de606201089ba4f15661037c556d49005604019
[LICM] Reapply r347776 "Make LICM able to hoist phis" with fix

This commit caused a large compile-time slowdown in some cases when NDEBUG is
off due to the dominator tree verification it added. Fix this by only doing
dominator tree and loop info verification when something has been hoisted.

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

llvm-svn: 347889
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/hoist-phi.ll [new file with mode: 0644]