llvm-project/llvm/test/Transforms/GVNHoist
Eli Friedman 88e2bac94d [MemorySSA] Fix exponential compile-time updating MemorySSA.
MemorySSAUpdater::getPreviousDefRecursive is a recursive algorithm, for
each block, it computes the previous definition for each predecessor,
then takes those definitions and combines them. But currently it doesn't
remember results which it already computed; this means it can visit the
same block multiple times, which adds up to exponential time overall.

To fix this, this patch adds a cache. If we computed the result for a
block already, we don't need to visit it again because we'll come up
with the same result. Well, unless we RAUW a MemoryPHI; in that case,
the TrackingVH will be updated automatically.

This matches the original source paper for this algorithm.

The testcase isn't really a test for the bug, but it adds coverage for
the case where tryRemoveTrivialPhi erases an existing PHI node. (It's
hard to write a good regression test for a performance issue.)

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

llvm-svn: 328577
2018-03-26 19:52:54 +00:00
..
hoist-call.ll
hoist-convergent.ll
hoist-inline.ll
hoist-md.ll
hoist-more-than-two-branches.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-mssa.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-newgvn.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-pr20242.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-pr22005.ll
hoist-pr28606.ll
hoist-pr28933.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-pr31891.ll
hoist-recursive-geps.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
hoist-simplify-phi.ll [MemorySSA] Fix exponential compile-time updating MemorySSA. 2018-03-26 19:52:54 +00:00
hoist-unsafe-pr31729.ll
hoist-very-busy.ll
hoist.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
infinite-loop-direct.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
infinite-loop-indirect.ll [GVNHoist] Factor out reachability to search for anticipable instructions quickly 2017-09-13 05:28:03 +00:00
int_sideeffect.ll Add an @llvm.sideeffect intrinsic 2017-11-08 21:59:51 +00:00
ld_hoist1.ll
ld_hoist_st_sink.ll
pr28626.ll
pr29031.ll
pr29034.ll
pr30216.ll
pr30499.ll
pr35222-hoist-load.ll [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loop 2018-01-04 07:47:24 +00:00