llvm-6502/test/Transforms/GVN
Owen Anderson a04a0649e1 Completely rework the datastructure GVN uses to represent the value number to leader mapping. Previously,
this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum
if the initial lookup failed.  This led to really bad performance on tall, narrow CFGs.

We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually
represented by a hashtable with a list of Value*'s as the value type), and then
determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by
DominatorTree.  Because there are typically few duplicates of a given value, this scan tends to be
quite fast.  Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary
allocation in representing the value-side of the multimap.

This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I
think is pretty good considering that includes all the "real work" being done by MemDep as well.

The one downside to this approach is that we can no longer use GVN to perform simple conditional progation,
but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up
the slack.  If you see conditional propagation that's not happening, please file bugs against LVI or CVP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18 18:32:40 +00:00
..
2007-07-25-DominatedLoop.ll
2007-07-25-InfiniteLoop.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
2007-07-25-Loop.ll
2007-07-25-NestedLoop.ll
2007-07-25-SinglePredecessor.ll
2007-07-26-InterlockingLoops.ll Teach InstructionSimplify about phi nodes. I chose to have it simply 2010-11-14 13:30:18 +00:00
2007-07-26-NonRedundant.ll
2007-07-26-PhiErasure.ll
2007-07-30-PredIDom.ll
2007-07-31-NoDomInherit.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
2007-07-31-RedundantPhi.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
2008-02-12-UndefLoad.ll
2008-02-13-NewPHI.ll stop using anders-aa 2010-03-01 20:24:50 +00:00
2008-02-24-NonDominatedMemcpy.ll
2008-02-26-MemCpySize.ll
2008-07-02-Unreachable.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
2008-12-09-SelfRemove.ll
2008-12-12-RLE-Crash.ll
2008-12-14-rle-reanalyze.ll
2008-12-15-CacheVisited.ll
2009-01-21-SortInvalidation.ll
2009-01-22-SortInvalidation.ll
2009-02-17-LoadPRECrash.ll
2009-03-10-PREOnVoid.ll
2009-06-17-InvalidPRE.ll
2009-07-13-MemDepSortFail.ll Correct bogus module triple specifications. 2010-08-30 10:48:29 +00:00
2009-11-12-MemDepMallocBitCast.ll
2010-03-31-RedundantPHIs.ll Teach InstructionSimplify about phi nodes. I chose to have it simply 2010-11-14 13:30:18 +00:00
2010-05-08-OneBit.ll Fix PR7052, patch by Jakub Staszak! 2010-05-08 20:01:44 +00:00
2010-11-13-Simplify.ll Testcase to go along with commit 118923 ("Have GVN simplify instructions 2010-11-13 21:33:19 +00:00
basic.ll
bitcast-of-call.ll
calls-nonlocal.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
calls-readonly.ll
crash-no-aa.ll Fix PR5744, a case where we were getting the pointer size instead of the 2009-12-10 00:11:45 +00:00
crash.ll a testcase that doesn't crash GVN but could someday. 2010-02-11 05:08:05 +00:00
dg.exp
invariant-simple.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
lifetime-simple.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
load-constant-mem.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
load-pre-align.ll Remove arm_apcscc from the test files. It is the default and doing this 2010-06-17 15:18:27 +00:00
load-pre-licm.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
local-pre.ll
lpre-call-wrap-2.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
lpre-call-wrap.ll
mixed.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
non-local-offset.ll Enhance GVN to do more precise alias queries for non-local memory 2010-11-10 20:37:15 +00:00
nonescaping-malloc.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
null-aliases-nothing.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
phi-translate.ll Add support for PHI-translating sext, zext, and trunc instructions, 2010-11-18 17:05:13 +00:00
pre-basic-add.ll
pre-load.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
pre-single-pred.ll LoadPRE was not properly checking that the load it was PRE'ing post-dominated the block it was being hoisted to. 2010-09-25 05:26:18 +00:00
rle-must-alias.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
rle-no-phi-translate.ll this test is failing, and is expected to. 2009-11-27 06:36:28 +00:00
rle-nonlocal.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
rle-phi-translate.ll fix an overly conservative caching issue that caused memdep to 2009-12-19 21:29:22 +00:00
rle-semidominated.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00
rle.ll Make BasicAliasAnalysis a normal AliasAnalysis implementation which 2010-10-18 18:04:47 +00:00