llvm-mirror/test/Analysis
Arnold Schwaighofer e02da03f09 BasicAA: Recognize cyclic NoAlias phis
Enhances basic alias analysis to recognize phis whose first incoming values are
NoAlias and whose other incoming values are just the phi node itself through
some amount of recursion.

Example: With this change basicaa reports that ptr_phi and ptr_phi2 do not alias
each other.

bb:
 ptr = ptr2 + 1

loop:
  ptr_phi = phi [bb, ptr], [loop, ptr_plus_one]
  ptr2_phi = phi [bb, ptr2], [loop, ptr2_plus_one]
  ...
  ptr_plus_one = gep ptr_phi, 1
  ptr2_plus_one = gep ptr2_phi, 1

This enables the elimination of one load in code like the following:

extern int foo;

int test_noalias(int *ptr, int num, int* coeff) {
  int *ptr2 = ptr;
  int result = (*ptr++) * (*coeff--);
  while (num--) {
    *ptr2++ = *ptr;
    result +=  (*coeff--) * (*ptr++);
  }
  *ptr = foo;
  return result;
}

Part 2/2 of fix for PR13564.

llvm-svn: 163319
2012-09-06 14:41:53 +00:00
..
BasicAA BasicAA: Recognize cyclic NoAlias phis 2012-09-06 14:41:53 +00:00
BlockFrequencyInfo Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
BranchProbabilityInfo BranchProb: modify the definition of an edge in BranchProbabilityInfo to handle 2012-08-24 18:14:27 +00:00
CallGraph Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
Dominators FileCheck-ize tests. 2012-04-24 10:45:44 +00:00
GlobalsModRef MemoryDependenceAnalysis attempts to find the first memory dependency for function calls. 2012-08-13 23:03:43 +00:00
LoopDependenceAnalysis Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
LoopInfo Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
PostDominators Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00
Profiling llvm/test/Analysis/Profiling: Mark 3 of them as REQUIRES: loadable_module. 2012-08-29 00:37:46 +00:00
RegionInfo Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
ScalarEvolution Fix broken check lines. 2012-08-17 12:28:26 +00:00
TypeBasedAliasAnalysis Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed. 2012-02-16 06:28:33 +00:00