1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/Analysis/BasicAA
Michael Kruse af578b1205 [BasicAA] Use MayAlias instead of PartialAlias for fallback.
Using various methods, BasicAA tries to determine whether two
GetElementPtr memory locations alias when its base pointers are known
to be equal. When none of its heuristics are applicable, it falls back
to PartialAlias to, according to a comment, protect TBAA making a wrong
decision in case of unions and malloc. PartialAlias is not correct,
because a PartialAlias result implies that some, but not all, bytes
overlap which is not necessarily the case here.

AAResults returns the first analysis result that is not MayAlias.
BasicAA is always the first alias analysis. When it returns
PartialAlias, no other analysis is queried to give a more exact result
(which was the intention of returning PartialAlias instead of MayAlias).
For instance, ScopedAA could return a more accurate result.

The PartialAlias hack was introduced in r131781 (and re-applied in
r132632 after some reverts) to fix llvm.org/PR9971 where TBAA returns a
wrong NoAlias result due to a union. A test case for the malloc case
mentioned in the comment was not provided and I don't think it is
affected since it returns an omnipotent char anyway.

Since r303851 (https://reviews.llvm.org/D33328) clang does emit specific
TBAA for unions anymore (but "omnipotent char" instead). Hence, the
PartialAlias workaround is not required anymore.

This patch passes the test-suite and check-llvm/check-clang of a
self-hoisted build on x64.

Reviewed By: hfinkel

Differential Revision: https://reviews.llvm.org/D34318

llvm-svn: 305938
2017-06-21 18:25:37 +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
2003-12-11-ConstExprGEP.ll
2004-07-28-MustAliasbug.ll
2006-03-03-BadArraySubscript.ll
2006-11-03-BasicAAVectorCrash.ll
2007-01-13-BasePointerBadNoAlias.ll
2007-08-01-NoAliasAndCalls.ll
2007-08-01-NoAliasAndGEP.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
2007-08-05-GetOverloadedModRef.ll
2007-10-24-ArgumentsGlobals.ll
2007-11-05-SizeCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2007-12-08-OutOfBoundsCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
2008-04-15-Byval.ll
2008-06-02-GEPTailCrash.ll
2008-11-23-NoaliasRet.ll
2009-03-04-GEPNoalias.ll
2009-10-13-AtomicModRef.ll
2009-10-13-GEP-BaseNoAlias.ll
2010-09-15-GEP-SignedArithmetic.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
2014-03-18-Maxlookup-reached.ll
aligned-overread.ll
args-rets-allocas-loads.ll
assume.ll [AliasAnalysis] Teach BasicAA about memcpy. 2016-12-25 22:42:27 +00:00
bug.23540.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
bug.23626.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
byval.ll
call-attrs.ll [BasicAA] Take attributes into account when requesting modref info for a call site 2017-03-01 13:19:51 +00:00
cas.ll
constant-over-index.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
cs-cs-arm.ll AA: Use generic intrinsics for tests instead of target specific ones 2017-05-13 00:12:52 +00:00
cs-cs.ll AA: Use generic intrinsics for tests instead of target specific ones 2017-05-13 00:12:52 +00:00
dag.ll
empty.ll
fallback-mayalias.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
featuretest.ll
full-store-partial-alias.ll [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
gcsetest.ll
gep-alias.ll [BasicAA] Add a test for PR24468 to be sure we won't regress 2015-08-19 00:08:26 +00:00
gep-and-alias.ll [BasicAA] Fix - missed alias in GEP expressions 2016-10-22 02:41:39 +00:00
getmodrefinfo-cs-cs.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
global-size.ll
guards.ll [AliasAnalysis] Teach BasicAA about memcpy. 2016-12-25 22:42:27 +00:00
intrinsics-arm.ll Add '#' to test regex that I forgot in r303025. 2017-05-15 04:58:27 +00:00
intrinsics.ll AA: Use generic intrinsics for tests instead of target specific ones 2017-05-13 00:12:52 +00:00
invalidation.ll [PM] Add more dedicated testing to cover the invalidation logic added to 2016-12-27 17:59:22 +00:00
invariant_load.ll
memset_pattern.ll [BasicAA] Remove special casing of memset_pattern16 in favor of generic attribute inference 2016-01-06 04:53:16 +00:00
modref.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
must-and-partial.ll
negoffset.ll [BasicAA] Extend inbound GEP negative offset logic to GlobalVariables 2016-05-26 19:30:49 +00:00
no-escape-call.ll
noalias-bugs.ll
noalias-geps.ll
noalias-param.ll
noalias-wraparound-bug.ll [BasicAA] Fix for missing must alias (D16343) 2016-01-30 05:52:53 +00:00
nocapture.ll
phi-aa.ll [PM/AA] Port alias analysis evaluator to the new pass manager, and use 2016-02-20 03:46:03 +00:00
phi-and-select.ll
phi-loop.ll
phi-spec-order.ll
phi-speculation.ll
pr18573.ll
pr31761.ll Fix BasicAA incorrect assumption on GEP 2017-01-27 16:12:22 +00:00
pure-const-dce.ll
q.bad.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
returned.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
sequential-gep.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
store-promote.ll
struct-geps.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00
tailcall-modref.ll
underlying-value.ll
unreachable-block.ll
zext.ll [BasicAA] Use MayAlias instead of PartialAlias for fallback. 2017-06-21 18:25:37 +00:00