summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.Duncan Sands2011-05-211-11/+1
| | | | | | | | | Original log message: When BasicAA can determine that two pointers have the same base but differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131809
* When BasicAA can determine that two pointers have the same base butDan Gohman2011-05-211-1/+11
| | | | | | | differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131781
* Teach BasicAA about arm.neon.vld1 and vst1.Dan Gohman2011-04-271-0/+20
| | | | llvm-svn: 130327
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-2/+2
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Revert r128140 for now.Anders Carlsson2011-03-231-33/+0
| | | | llvm-svn: 128149
* A global variable with internal linkage where all uses are in one function ↵Anders Carlsson2011-03-231-0/+33
| | | | | | and whose address is never taken is a non-escaping local object and can't alias anything else. llvm-svn: 128140
* Give GetUnderlyingObject a TargetData, to keep it in syncDan Gohman2011-01-241-5/+5
| | | | | | | | | | | with BasicAA's DecomposeGEPExpression, which recently began using a TargetData. This fixes PR8968, though the testcase is awkward to reduce. Also, update several off GetUnderlyingObject's users which happen to have a TargetData handy to pass it in. llvm-svn: 124134
* Teach BasicAA to return PartialAlias in cases where both pointersDan Gohman2011-01-181-12/+35
| | | | | | | | are pointing to the same object, one pointer is accessing the entire object, and the other is access has a non-zero size. This prevents TBAA from kicking in and saying NoAlias in such cases. llvm-svn: 123775
* fix rdar://8813415 - a miscompilation of 164.gzip that loop-idiomChris Lattner2011-01-031-0/+2
| | | | | | exposed. It turns out to be a latent bug in basicaa, scary. llvm-svn: 122772
* Reapply r121886, and also update DecomposeGEPExpression to keepDan Gohman2010-12-151-0/+9
| | | | | | it in sync. llvm-svn: 121895
* Move Value::getUnderlyingObject to be a standaloneDan Gohman2010-12-151-8/+8
| | | | | | | function so that it can live in Analysis instead of VMCore. llvm-svn: 121885
* Reapply r121520, PartialAlias implementation for BasicAA, now thatDan Gohman2010-12-131-0/+11
| | | | | | memdep is updated to handle it. llvm-svn: 121725
* Revert r121520, which may have introduced miscompilations.Dan Gohman2010-12-101-11/+0
| | | | llvm-svn: 121573
* Implement PartialAlias checking in BasicAA.Dan Gohman2010-12-101-0/+11
| | | | llvm-svn: 121520
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-071-4/+4
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
* enhance basicaa to return "Mod" for a memcpy call when theChris Lattner2010-11-301-0/+5
| | | | | | queried location doesn't overlap the source, and add a testcase. llvm-svn: 120370
* Teach basicaa that memset's modref set is at worst "mod" and neverChris Lattner2010-11-301-0/+2
| | | | | | | | | | contains "ref". Enhance DSE to use a modref query instead of a store-specific hack to generalize the "ignore may-alias stores" optimization to handle memset and memcpy. llvm-svn: 120368
* Make ModRefBehavior a lattice. Use this to clean up AliasAnalysisDan Gohman2010-11-101-5/+9
| | | | | | chaining and simplify FunctionAttrs' GetModRefBehavior logic. llvm-svn: 118660
* Re-introduce the MaxLookup limit to BasicAliasAnalysis'Dan Gohman2010-11-081-2/+8
| | | | | | | pointsToConstantMemory code to guard against possible compile time slowdowns. llvm-svn: 118440
* Extend the AliasAnalysis::pointsToConstantMemory interface to allow itDan Gohman2010-11-081-11/+54
| | | | | | | | | | | | 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
* Teach BasicAliasAnalysis::getModRefBehavior(const Function *F)Dan Gohman2010-11-081-3/+11
| | | | | | to analyze intrinsic functions. llvm-svn: 118409
* Move NoAA out of BasicAliasAnalysis.cpp into its own file, now thatDan Gohman2010-10-191-81/+8
| | | | | | | it doesn't have a special relationship with BasicAliasAnalysis anymore. llvm-svn: 116876
* Reapply r116831 and r116839, converting AliasAnalysis to useDan Gohman2010-10-191-24/+26
| | | | | | uint64_t, plus fixes for places I missed before. llvm-svn: 116875
* Revert r116831 and r116839, which are breaking selfhost builds.Dan Gohman2010-10-191-26/+24
| | | | llvm-svn: 116858
* Change AliasAnalysis and its clients to use uint64_t instead of unsignedDan Gohman2010-10-191-24/+26
| | | | | | for representing object sizes, for consistency with other parts of LLVM. llvm-svn: 116831
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-3/+7
| | | | | | | | | | | | | | | | | 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
* Fix BasicAA to pass TBAAInfo through to the chained analysis.Dan Gohman2010-10-181-26/+47
| | | | llvm-svn: 116730
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-181-11/+25
| | | | | | | | | | | | does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. llvm-svn: 116720
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-2/+2
| | | | llvm-svn: 115996
* PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bitEli Friedman2010-09-151-3/+3
| | | | | | targets. llvm-svn: 114015
* Remove the experimental AliasAnalysis::getDependency interface, whichDan Gohman2010-09-141-55/+34
| | | | | | | | | | | 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
* Extend the getDependence query with support for PHI translation.Dan Gohman2010-09-091-1/+8
| | | | llvm-svn: 113521
* Add a new experimental generalized dependence query interface toDan Gohman2010-09-081-0/+20
| | | | | | | | AliasAnalysis, and some code for implementing the new query on top of existing implementations by making standard alias and getModRefInfo queries. llvm-svn: 113329
* refix PR1143 by making basicaa analyze zexts of indices aggresively,Chris Lattner2010-08-181-11/+30
| | | | | | which I broke with a recent patch. llvm-svn: 111452
* GetLinearExpression is only called when TD is non-null, pass as Chris Lattner2010-08-181-4/+4
| | | | | | a reference instead of pointer. llvm-svn: 111445
* rework GEP decomposition to make a new VariableGEPIndex struct instead ofChris Lattner2010-08-181-19/+39
| | | | | | | using a pair. This tidies up the code a bit. While setting things up, add a (currently unused) field to keep track of how the value is extended. llvm-svn: 111444
* move gep decomposition out of ValueTracking into BasicAA. The form ofChris Lattner2010-08-181-34/+229
| | | | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. Now with less tree breakingness. llvm-svn: 111433
* Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. TheDaniel Dunbar2010-08-181-213/+34
| | | | | | form of", it doesn't pass tests. llvm-svn: 111385
* move gep decomposition out of ValueTracking into BasicAA. The form ofChris Lattner2010-08-181-34/+213
| | | | | | | decomposition that it is doing is very basicaa specific and is only used by basicaa. llvm-svn: 111375
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-7/+7
| | | | llvm-svn: 110460
* Move all the logic for function attributes and call attributes out of theDan Gohman2010-08-061-120/+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
* Fix botched revert.Owen Anderson2010-08-061-4/+4
| | | | llvm-svn: 110416
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-3/+3
| | | | llvm-svn: 110410
* Fix 80-column violations.Dan Gohman2010-08-051-6/+6
| | | | llvm-svn: 110401
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-7/+7
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Implement AccessesArguments checking in the two-callsite formDan Gohman2010-08-051-2/+32
| | | | | | | of BasicAA::getModRefInfo. This allows BasicAA to say that two memset calls to non-aliasing memory locations don't interfere. llvm-svn: 110393
* Fix memdep's code for reasoning about dependences between two calls. A RefDan Gohman2010-08-051-1/+6
| | | | | | | | | | response from getModRefInfo is not useful here. Instead, check for identical calls only in the NoModRef case. Reapply r110270, and strengthen it to compensate for the memdep changes. When both calls are readonly, there is no dependence between them. llvm-svn: 110382
* Revert r110270 for now. It appears to uncover a memdep bug.Dan Gohman2010-08-051-2/+2
| | | | llvm-svn: 110293
* The two-callsite form of AliasAnalysis::getModRefInfo is documentedDan Gohman2010-08-041-2/+2
| | | | | | | | | | to return Ref if the left callsite only reads memory read or written by the right callsite; fix BasicAliasAnalysis to implement this. Add AliasAnalysisEvaluator support for testing the two-callsite form of getModRefInfo. llvm-svn: 110270
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-031-9/+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
OpenPOWER on IntegriCloud