llvm-6502/test/Analysis
Hal Finkel 04fe990190 Improve BasicAA CS-CS queries
BasicAA contains knowledge of certain intrinsics, such as memcpy and memset,
and uses that information to form more-accurate answers to CallSite vs. Loc
ModRef queries. Unfortunately, it did not use this information when answering
CallSite vs. CallSite queries.

Generically, when an intrinsic takes one or more pointers and the intrinsic is
marked only to read/write from its arguments, the offset/size is unknown. As a
result, the generic code that answers CallSite vs. CallSite (and CallSite vs.
Loc) queries in AA uses UnknownSize when forming Locs from an intrinsic's
arguments. While BasicAA's CallSite vs. Loc override could use more-accurate
size information for some intrinsics, it did not do the same for CallSite vs.
CallSite queries.

This change refactors the intrinsic-specific logic in BasicAA into a generic AA
query function: getArgLocation, which is overridden by BasicAA to supply the
intrinsic-specific knowledge, and used by AA's generic implementation. This
allows the intrinsic-specific knowledge to be used by both CallSite vs. Loc and
CallSite vs. CallSite queries, and simplifies the BasicAA implementation.

Currently, only one function, Mac's memset_pattern16, is handled by BasicAA
(all the rest are intrinsics). As a side-effect of this refactoring, BasicAA's
getModRefBehavior override now also returns OnlyAccessesArgumentPointees for
this function (which is an improvement).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212572 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-08 23:16:49 +00:00
..
BasicAA Improve BasicAA CS-CS queries 2014-07-08 23:16:49 +00:00
BlockFrequencyInfo Fix typos 2014-05-15 01:52:21 +00:00
BranchProbabilityInfo Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of basic blocks inside loops correctly. 2014-04-14 16:56:19 +00:00
CallGraph [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
CostModel [CostModel][x86] Improved cost model for alternate shuffles. 2014-07-03 22:24:18 +00:00
Delinearization ScalarEvolution: Derive element size from the type of the loaded element 2014-06-08 19:21:20 +00:00
DependenceAnalysis remove constant terms 2014-05-27 22:41:45 +00:00
Dominators [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
GlobalsModRef BasicAA: Use reachabilty instead of dominance for checking value equality in phi 2014-01-03 05:47:03 +00:00
LazyCallGraph [LCG] Add support for building persistent and connected SCCs to the 2014-04-18 10:50:32 +00:00
Lint Teach lint about address spaces 2014-03-06 17:33:55 +00:00
LoopInfo FileCheck-ize tests. 2013-08-22 00:51:19 +00:00
MemoryDependenceAnalysis [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
PostDominators FileCheck-ize tests. 2013-08-22 00:51:19 +00:00
RegionInfo [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ScalarEvolution Adding testcase for PR18886. 2014-05-27 06:44:25 +00:00
TypeBasedAliasAnalysis Fix known typos 2014-01-24 17:20:08 +00:00