aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/AliasAnalysis.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-07-18land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner1-1/+1
llvm-svn: 135375
2011-04-27When analyzing functions known to only access argument pointees,Dan Gohman1-9/+28
only check arguments with pointer types. Update the documentation of IntrReadArgMem reflect this. While here, add support for TBAA tags on intrinsic calls. llvm-svn: 130317
2011-01-03Stub out a new updating interface to AliasAnalysis, allowing stateful ↵Owen Anderson1-0/+6
analyses to be informed when a pointer value has potentially become escaping. Implementations can choose to either fall back to conservative responses for that value, or may recompute their analysis to accomodate the change. llvm-svn: 122777
2010-12-16Make memcpyopt TBAA-aware.Dan Gohman1-4/+10
llvm-svn: 121944
2010-11-30getLocationForDest should work for memset as well.Chris Lattner1-1/+1
llvm-svn: 120380
2010-11-21add "getLocation" method to AliasAnalysis for getting the source andChris Lattner1-0/+23
destination location of a memcpy/memmove. I'm not clear about whether TBAA works on these, so I'm leaving it out for now. Dan, please revisit this when convenient. llvm-svn: 119928
2010-11-11Add helper functions for computing the Location of load, store,Dan Gohman1-12/+21
and vaarg instructions. llvm-svn: 118845
2010-11-10Add a doesAccessArgPointees helper function, and update code to useDan Gohman1-22/+24
it, and to be consistent. llvm-svn: 118692
2010-11-10Make ModRefBehavior a lattice. Use this to clean up AliasAnalysisDan Gohman1-1/+1
chaining and simplify FunctionAttrs' GetModRefBehavior logic. llvm-svn: 118660
2010-11-09Teach AliasAnalysis about AccessesArgumentsReadonly.Dan Gohman1-6/+8
llvm-svn: 118621
2010-11-08Extend the AliasAnalysis::pointsToConstantMemory interface to allow itDan Gohman1-2/+3
to optionally look for constant or local (alloca) memory. Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select and Phi nodes, and to support looking for local memory. Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that AliasAnalysis knows all the tricks that it knew. llvm-svn: 118412
2010-11-08Delete getIntrinsicModRefBehavior. Clients can just use the normalDan Gohman1-7/+0
getModRefBehavior now, since it now understands intrinsics as well as normal functions. llvm-svn: 118411
2010-10-25Update comments; BasicAA is no longer necessarily the end of the chain.Dan Gohman1-3/+3
llvm-svn: 117268
2010-10-25Reintroduce these asserts, now that BasicAA is a normal AliasAnalysis pass.Dan Gohman1-6/+3
llvm-svn: 117266
2010-10-19Move NoAA out of BasicAliasAnalysis.cpp into its own file, now thatDan Gohman1-6/+0
it doesn't have a special relationship with BasicAliasAnalysis anymore. llvm-svn: 116876
2010-10-19Reapply r116831 and r116839, converting AliasAnalysis to useDan Gohman1-1/+1
uint64_t, plus fixes for places I missed before. llvm-svn: 116875
2010-10-19Revert r116831 and r116839, which are breaking selfhost builds.Dan Gohman1-1/+1
llvm-svn: 116858
2010-10-19Change AliasAnalysis and its clients to use uint64_t instead of unsignedDan Gohman1-1/+1
for representing object sizes, for consistency with other parts of LLVM. llvm-svn: 116831
2010-10-19Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson1-1/+1
exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
2010-10-19Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.Dan Gohman1-1/+1
llvm-svn: 116815
2010-10-13Analysis groups need to initialize their default implementations.Owen Anderson1-1/+1
llvm-svn: 116441
2010-10-07Now with fewer extraneous semicolons!Owen Anderson1-1/+1
llvm-svn: 115996
2010-10-06Hide analysis group registration behind a macro, just like pass registration.Owen Anderson1-1/+1
llvm-svn: 115835
2010-09-14Remove the experimental AliasAnalysis::getDependency interface, whichDan Gohman1-254/+31
isn't a good level of abstraction for memdep. Instead, generalize AliasAnalysis::alias and related interfaces with a new Location class for describing a memory location. For now, this is the same Pointer and Size as before, plus an additional field for a TBAA tag. Also, introduce a fixed MD_tbaa metadata tag kind. llvm-svn: 113858
2010-09-09Extend the getDependence query with support for PHI translation.Dan Gohman1-12/+49
llvm-svn: 113521
2010-09-08Add a new experimental generalized dependence query interface toDan Gohman1-0/+192
AliasAnalysis, and some code for implementing the new query on top of existing implementations by making standard alias and getModRefInfo queries. llvm-svn: 113329
2010-08-06Implement a proper getModRefInfo for va_arg.Dan Gohman1-0/+17
llvm-svn: 110458
2010-08-06Be more conservative in the face of volatile.Dan Gohman1-8/+8
llvm-svn: 110456
2010-08-06Fix a comment.Dan Gohman1-2/+2
llvm-svn: 110455
2010-08-06Move all the logic for function attributes and call attributes out of theDan Gohman1-59/+119
AliasAnalysis base class and into BasicAliasAnalyais. This avoids confusion about where such logic is happening when there are other AliasAnalysis implementations present. Move the logic for translating two-callsite getModRefInfo queries into other AliasAnalysis queries out of BasicAliasAnalysis and into the AliasAnalysis base class, as it is useful for other AliasAnalysis implementations. llvm-svn: 110421
2010-08-05Yes, we can do better, but this is not the place for it.Dan Gohman1-1/+0
llvm-svn: 110391
2010-08-03Remove PointerAccessInfo, which nothing was using.Dan Gohman1-5/+3
llvm-svn: 110167
2010-08-03Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman1-13/+15
eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. llvm-svn: 110155
2010-08-03Make AliasAnalysis::getModRefInfo conservative in the face of volatility.Dan Gohman1-3/+20
llvm-svn: 110120
2010-07-07Remove interprocedural-basic-aa and associated code. The AliasAnalysisDan Gohman1-9/+7
interface needs implementations to be consistent, so any code which wants to support different semantics must use a different interface. It's not currently worthwhile to add a new interface for this new concept. Document that AliasAnalysis doesn't support cross-function queries. llvm-svn: 107776
2010-06-29Add an Intraprocedural form of BasicAliasAnalysis, which aims toDan Gohman1-6/+10
properly handles instructions and arguments defined in different functions, or across recursive function iterations. llvm-svn: 107109
2010-01-06Partially address a README by having functionattrs consider calls toDuncan Sands1-4/+7
memcpy, memset and other intrinsics that only access their arguments to be readnone if the intrinsic's arguments all point to local memory. This improves the testcase in the README to readonly, but it could in theory be made readnone, however this would involve more sophisticated analysis that looks through the memcpy. llvm-svn: 92829
2009-11-23use the new isNoAlias method to simplify some code, only do an escaping ↵Chris Lattner1-3/+4
check if we have a non-constant pointer. Constant pointers can't be local. llvm-svn: 89665
2009-11-22Remove the AliasAnalysis::getMustAliases method, which is dead.Chris Lattner1-10/+0
The hasNoModRefInfoForCalls isn't worth it as a filter because basicaa provides m/r info and everything chains to it, so remove it. llvm-svn: 89599
2009-10-23Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez1-1/+1
subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
2009-08-27Global Aliases are not identifiable objects.Dan Gohman1-2/+4
llvm-svn: 80263
2009-07-25Make AliasAnalysis and related classes useDan Gohman1-6/+11
getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028
2009-02-14Generalize some alias analysis logic from atomicDuncan Sands1-1/+6
intrinsics to any IntrWriteArgMem intrinsics. llvm-svn: 64551
2009-02-13If a function only reads memory, then we know that...Duncan Sands1-7/+11
it only reads memory! The other change has no functional effect, it just seems more logical to go in order of decreasing knowledge. llvm-svn: 64463
2009-02-06Fix a crasher: we need to check that the function is non-null before using it!Owen Anderson1-1/+1
llvm-svn: 63902
2009-02-05Refactor my previous change to maintain the distinction between ↵Owen Anderson1-56/+14
AliasAnalysis and BasicAliasAnalysis. This involves some wider changes because it folds away some never-used methods. llvm-svn: 63900
2009-02-04Finish making AliasAnalysis aware of the fact that most atomic intrinsics ↵Owen Anderson1-0/+21
only dereference their arguments, and enhance BasicAA to make use of this fact when computing ModRef info. llvm-svn: 63718
2009-02-03Teach AliasAnalysis that a bunch of the atomic intrinsics only dereference ↵Owen Anderson1-0/+22
their arguments. llvm-svn: 63616
2009-02-03Move isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp sinceDan Gohman1-0/+24
they are useful to analyses other than BasicAliasAnalysis.cpp. Include the full comment for isIdentifiedObject in the header file. Thanks to Chris for suggeseting this. llvm-svn: 63589
2008-05-30Fix a copy+paste error in a comment.Dan Gohman1-1/+1
llvm-svn: 51717