1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Analysis/BasicAA
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
..
2003-02-26-AccessSizeTest.ll
2003-03-04-GEPCrash.ll
2003-04-22-GEPProblem.ll
2003-04-25-GEPCrash.ll
2003-05-21-GEP-Problem.ll
2003-06-01-AliasCrash.ll
2003-07-03-BasicAACrash.ll
2003-09-19-LocalArgument.ll
2003-11-04-SimpleCases.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2003-12-11-ConstExprGEP.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2004-07-28-MustAliasbug.ll
2006-03-03-BadArraySubscript.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2006-11-03-BasicAAVectorCrash.ll
2007-01-13-BasePointerBadNoAlias.ll
2007-08-01-NoAliasAndCalls.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2007-08-01-NoAliasAndGEP.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2007-08-05-GetOverloadedModRef.ll
2007-10-24-ArgumentsGlobals.ll
2007-11-05-SizeCrash.ll
2007-12-08-OutOfBoundsCrash.ll
2008-04-15-Byval.ll
2008-06-02-GEPTailCrash.ll
2008-11-23-NoaliasRet.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2009-03-04-GEPNoalias.ll
2009-10-13-AtomicModRef.ll
2009-10-13-GEP-BaseNoAlias.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
2010-09-15-GEP-SignedArithmetic.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
aligned-overread.ll
args-rets-allocas-loads.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
byval.ll
cas.ll
constant-over-index.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
dag.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
empty.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
featuretest.ll
full-store-partial-alias.ll
gcsetest.ll
gep-alias.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
getmodrefinfo-cs-cs.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
global-size.ll
intrinsics.ll
lit.local.cfg
memset_pattern.ll
modref.ll
must-and-partial.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
no-escape-call.ll
noalias-geps.ll BasicAA: GEPs of NoAlias'ing base ptr with equivalent indices are NoAlias 2012-09-06 14:31:51 +00:00
nocapture.ll
phi-aa.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
phi-and-select.ll Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
phi-speculation.ll BasicAA: Recognize cyclic NoAlias phis 2012-09-06 14:41:53 +00:00
pure-const-dce.ll
store-promote.ll
tailcall-modref.ll
underlying-value.ll
unreachable-block.ll