summaryrefslogtreecommitdiff
path: root/lib/Analysis/TypeBasedAliasAnalysis.cpp
Commit message (Collapse)AuthorAge
* TBAA: fix PR17620.Manman Ren2013-10-22
| | | | | | | | We can have a struct type with a single field and the field does not start with 0. In that case, we should correctly update the offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193137 91177308-0d34-0410-b5e6-96231b3b80d8
* TBAA: try to fix the dragonegg bots.Manman Ren2013-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191585 91177308-0d34-0410-b5e6-96231b3b80d8
* TBAA: handle scalar TBAA format and struct-path aware TBAA format.Manman Ren2013-09-27
| | | | | | | | | | | | | | | | | Remove the command line argument "struct-path-tbaa" since we should not depend on command line argument to decide which format the IR file is using. Instead, we check the first operand of the tbaa tag node, if it is a MDNode, we treat it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA format. When clang starts to use struct-path aware TBAA format no matter whether struct-path-tbaa is no, and we can auto-upgrade existing bc files, the support for scalar TBAA format can be dropped. Existing testing cases are updated to use the struct-path aware TBAA format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191538 91177308-0d34-0410-b5e6-96231b3b80d8
* TBAA: add isTBAAVtableAccess to MDNode so clients can call the functionManman Ren2013-09-06
| | | | | | | | | | | | | | instead of having its own implementation. The implementation of isTBAAVtableAccess is in TypeBasedAliasAnalysis.cpp since it is related to the format of TBAA metadata. The path for struct-path tbaa will be exercised by test/Instrumentation/ThreadSanitizer/read_from_global.ll, vptr_read.ll, and vptr_update.ll when struct-path tbaa is on by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190216 91177308-0d34-0410-b5e6-96231b3b80d8
* Struct-path aware TBAA: change the format of TBAAStructType node.Manman Ren2013-04-27
| | | | | | | | | We switch the order of offset and field type to make TBAAStructType node (name, parent node, offset) similar to scalar TBAA node (name, parent node). TypeIsImmutable is added to TBAAStructTag node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180654 91177308-0d34-0410-b5e6-96231b3b80d8
* Struct-path aware TBAA: update getMostGenericTBAA Manman Ren2013-04-22
| | | | | | | | | | | The tag is of type TBAANode when flag EnableStructPathTBAA is off. Move implementation of MDNode::getMostGenericTBAA to TypeBasedAliasAnalysis.cpp since it depends on how to interprete the MDNodes for scalar TBAA and struct-path aware TBAA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180068 91177308-0d34-0410-b5e6-96231b3b80d8
* Aliasing rules for struct-path aware TBAA.Manman Ren2013-04-11
| | | | | | | | Added PathAliases to check if two struct-path tags can alias. Added command line option -struct-path-tbaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179337 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include Operator.h from InstrTypes.h.Jay Foad2011-04-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129271 91177308-0d34-0410-b5e6-96231b3b80d8
* Update a comment.Dan Gohman2010-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121946 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TBAA by default.Dan Gohman2010-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121923 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-disable TBAA for now; it broke MultiSource/Applications/JM/lencod,Dan Gohman2010-11-12
| | | | | | | at least. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118890 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TBAA.Dan Gohman2010-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118884 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ModRefBehavior a lattice. Use this to clean up AliasAnalysisDan Gohman2010-11-10
| | | | | | | chaining and simplify FunctionAttrs' GetModRefBehavior logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118660 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement getModRefBehavior for TypeBasedAliasAnalysis.Dan Gohman2010-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118416 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the AliasAnalysis::pointsToConstantMemory interface to allow itDan Gohman2010-11-08
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118412 91177308-0d34-0410-b5e6-96231b3b80d8
* Support TBAA attachments on calls. This is somewhat experimental.Dan Gohman2010-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117317 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix chaining in TBAA's pointsToConstantMemory.Dan Gohman2010-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117314 91177308-0d34-0410-b5e6-96231b3b80d8
* Only read one bit for testing for a readonly type, leaving the otherDan Gohman2010-10-25
| | | | | | | bits open for future uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117301 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117288 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more documentation.Dan Gohman2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117070 91177308-0d34-0410-b5e6-96231b3b80d8
* Explain what "constant" means here.Dan Gohman2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117053 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments.Dan Gohman2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117048 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the main aliasing check into a separate function.Dan Gohman2010-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116958 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments; the type graph is currently a tree, not a DAG.Dan Gohman2010-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116954 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-19
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TypeBasedAliasAnalysis default to doing nothing, with a command-lineDan Gohman2010-10-18
| | | | | | | option to enable it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116722 91177308-0d34-0410-b5e6-96231b3b80d8
* Use chaining in TypeBasedAliasAnalysis::pointsToConstantMemory.Dan Gohman2010-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116721 91177308-0d34-0410-b5e6-96231b3b80d8
* Tolerate a null parent pointer.Dan Gohman2010-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116533 91177308-0d34-0410-b5e6-96231b3b80d8
* Support AA chaining.Dan Gohman2010-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116264 91177308-0d34-0410-b5e6-96231b3b80d8
* Now with fewer extraneous semicolons!Owen Anderson2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert TBAA to use the new TBAATag field of AliasAnalysis::Location.Dan Gohman2010-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113892 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the experimental AliasAnalysis::getDependency interface, whichDan Gohman2010-09-14
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113858 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo Devang noticed.Dan Gohman2010-08-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110115 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch up a preliminary Type-Based Alias Analysis implementation.Dan Gohman2010-08-02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110077 91177308-0d34-0410-b5e6-96231b3b80d8