summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.Nick Lewycky2011-11-201-2/+1
| | | | | | | | Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
* Remove the old atomic instrinsics. autoupgrade functionality is included ↵Eli Friedman2011-10-061-20/+0
| | | | | | with this patch. llvm-svn: 141333
* PR10628: Fix getModRefInfo so it queries the underlying alias() ↵Eli Friedman2011-09-281-1/+1
| | | | | | implementation correctly while checking nocapture calls. llvm-svn: 140666
* A couple minor corrections to r139276.Eli Friedman2011-09-081-14/+14
| | | | llvm-svn: 139277
* Fix the logic in BasicAliasAnalysis::aliasGEP for comparing GEP's with ↵Eli Friedman2011-09-081-33/+33
| | | | | | variable differences so that it actually does something sane. Fixes PR10881. llvm-svn: 139276
* memset_pattern16 uses a 16 BYTE pattern, not a 16 BIT pattern. Add comments ↵Owen Anderson2011-09-061-2/+4
| | | | | | to that effect. llvm-svn: 139205
* Teach BasicAA about the aliasing properties of memset_pattern16.Owen Anderson2011-09-061-1/+40
| | | | | | Fixes PR10872 and <rdar://problem/10065079>. llvm-svn: 139204
* Explicitly cast narrowing conversions inside {}s that will become errors inJeffrey Yasskin2011-07-271-1/+2
| | | | | | C++0x. llvm-svn: 136211
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-2/+2
| | | | llvm-svn: 135375
* Initialize BasicAA's AliasCache to set it to use fewer buckets byDan Gohman2011-06-101-1/+7
| | | | | | | | default, since it usually has very few elements. This speeds up alias queries in many cases, because AliasCache.clear() doesn't have to visit as many buckets. llvm-svn: 132862
* Reapply r131781, now that the GVN bug with partially-aliasing loadsDan Gohman2011-06-041-1/+11
| | | | | | is disabled. llvm-svn: 132632
* Revert r131781 again. Apparently there is more going on here.Dan Gohman2011-06-041-11/+1
| | | | llvm-svn: 132625
* Reapply r131781 (revert r131809), now that some BasicAA shortcomingsDan Gohman2011-06-041-1/+11
| | | | | | it exposed are fixed. llvm-svn: 132611
* Fix BasicAA's recursion detection so that it doesn't pessimizeDan Gohman2011-06-041-37/+27
| | | | | | | | | queries in the case of a DAG, where a query reaches a node visited earlier, but it's not on a cycle. This avoids MayAlias results in cases where BasicAA is expected to return MustAlias or PartialAlias in order to protect TBAA. llvm-svn: 132609
* When merging MustAlias and PartialAlias, chose PartialAlias insteadDan Gohman2011-06-031-10/+21
| | | | | | of conservatively choosing MayAlias. llvm-svn: 132579
* Make DecomposeGEPExpression check SimplifyInstruction onlyDan Gohman2011-05-241-9/+12
| | | | | | | | after checking for a GEP, so that it matches what GetUnderlyingObject does. This fixes an obscure bug turned up by bugpoint in the testcase for PR9931. llvm-svn: 131971
* fix a really nasty basicaa mod/ref calculation bug that was causing ↵Chris Lattner2011-05-231-2/+5
| | | | | | | | miscompilation of UnitTests/ObjC/messages-2.m with the recent optimizer improvements. llvm-svn: 131897
* 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
OpenPOWER on IntegriCloud