Enhance GVN to do more precise alias queries for non-local memory
authorDan Gohman <gohman@apple.com>
Wed, 10 Nov 2010 20:37:15 +0000 (20:37 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 10 Nov 2010 20:37:15 +0000 (20:37 +0000)
commit075fb5d68fcb55d26e44c48f07dfdbbfa21ccb2a
treebd2ac0b33edd3125d8741077ff4a5c274276b35e
parentaf3d38f70ebba9fec0048c2540dbdf0168d280d2
Enhance GVN to do more precise alias queries for non-local memory
references. For example, this allows gvn to eliminate the load in
this example:

  void foo(int n, int* p, int *q) {
    p[0] = 0;
    p[1] = 1;
    if (n) {
      *q = p[0];
    }
  }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118714 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AliasAnalysis.h
include/llvm/Analysis/MemoryDependenceAnalysis.h
lib/Analysis/MemDepPrinter.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/non-local-offset.ll [new file with mode: 0644]