OSDN Git Service

Teach GVN to invalidate some memdep information when it does an RAUW
authorChris Lattner <sabre@nondot.org>
Tue, 9 Dec 2008 22:06:23 +0000 (22:06 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 Dec 2008 22:06:23 +0000 (22:06 +0000)
commitbc99be10b815e0bfc5102bd5746e9a80feebf6f4
tree1ba79094c51ef5796094d15796d0eb68ea1c8e1f
parent47d9dcc584cdb7fd645ca1d5c2a0ce363570aeb7
Teach GVN to invalidate some memdep information when it does an RAUW
of a pointer.  This allows is to catch more equivalencies.  For example,
the type_lists_compatible_p function used to require two iterations of
the gvn pass (!) to delete its 18 redundant loads because the first pass
would CSE all the addressing computation cruft, which would unblock the
second memdep/gvn passes from recognizing them.  This change allows
memdep/gvn to catch all 18 when run just once on the function (as is
typical :) instead of just 3.

On all of 403.gcc, this bumps up the # reundandancies found from:

     63 gvn    - Number of instructions PRE'd
 153991 gvn    - Number of instructions deleted
  50069 gvn    - Number of loads deleted
to:
     63 gvn    - Number of instructions PRE'd
 154137 gvn    - Number of instructions deleted
  50185 gvn    - Number of loads deleted

+120 loads deleted isn't bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60799 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/MemoryDependenceAnalysis.h
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Transforms/Scalar/GVN.cpp