summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-4/+4
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* inline isGEP away.Chris Lattner2009-10-171-10/+6
| | | | llvm-svn: 84373
* When checking aliases between phi sources and V2, we know the sources are ↵Evan Cheng2009-10-161-3/+3
| | | | | | not themselves phi nodes. However, V2 may be. Call aliasCheck with V2 first to potentially eliminate a std::swap call. llvm-svn: 84226
* Add missing break statements! Thanks to Duncan Sands for pointing this out!Nick Lewycky2009-10-151-0/+2
| | | | llvm-svn: 84191
* Teach basicaa about memcpy/memmove/memset. The length argument can be used toNick Lewycky2009-10-151-0/+22
| | | | | | improve alias results if constant, and the source pointer can't be modified. llvm-svn: 84175
* Teach BasicAA to use the size parameter of the memory use marker intrinsics.Nick Lewycky2009-10-151-18/+29
| | | | llvm-svn: 84174
* Take advantage of TargetData when available; we know that the atomic intrinsicsNick Lewycky2009-10-151-18/+23
| | | | | | only dereference the element they point to directly with no pointer arithmetic. llvm-svn: 84159
* Clear VisitedPHIs after use.Evan Cheng2009-10-141-1/+3
| | | | llvm-svn: 84080
* Another BasicAA fix. If a value does not alias a GEP's base pointer, then itEvan Cheng2009-10-141-39/+46
| | | | | | | | cannot alias the GEP. GEP pointer alias rule states this clearly: A pointer value formed from a getelementptr instruction is associated with the addresses associated with the first operand of the getelementptr. llvm-svn: 84079
* More code clean up based on patch feedback.Evan Cheng2009-10-141-12/+16
| | | | llvm-svn: 84074
* Change VisitedPHIs into an instance variable that's freed by each alias() call.Evan Cheng2009-10-141-22/+22
| | | | llvm-svn: 84072
* Teach basic AA about PHI nodes. If all operands of a phi NoAlias another ↵Evan Cheng2009-10-131-12/+69
| | | | | | value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias. llvm-svn: 84038
* Refactor some code. No functionality changes.Evan Cheng2009-10-131-105/+119
| | | | llvm-svn: 84000
* Teach BasicAA a little something about the atomic intrinsics: they can onlyNick Lewycky2009-10-131-0/+21
| | | | | | modify through the pointer they're given. llvm-svn: 83959
* Enhance analysis passes so that they apply the same analysis to malloc calls ↵Victor Hernandez2009-09-181-3/+11
| | | | | | | | as to MallocInst. Reviewed by Eli Friedman. llvm-svn: 82281
* Use stripPointerCasts instead of doing the same manually.Dan Gohman2009-08-271-14/+3
| | | | llvm-svn: 80267
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-11/+14
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-9/+7
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-4/+4
| | | | llvm-svn: 77494
* Make AliasAnalysis and related classes useDan Gohman2009-07-251-18/+20
| | | | | | getAnalysisIfAvailable<TargetData>(). llvm-svn: 77028
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-2/+2
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-16/+16
| | | | llvm-svn: 76702
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-7/+2
| | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
* Make BasicAliasAnalysis and Value::getUnderlyingObject useDan Gohman2009-07-171-4/+6
| | | | | | | | GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine that create GEPs that may overflow clear the NoOverflow value. Among other things, this partially addresses PR2831. llvm-svn: 76252
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-0/+4
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+2
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-061-1/+1
| | | | llvm-svn: 74878
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-061-15/+19
| | | | | | files. llvm-svn: 74844
* Remove unneeded #include.Owen Anderson2009-06-221-1/+0
| | | | llvm-svn: 73911
* Teach BasicAliasAnalysis to understand constant gep indices that fallDan Gohman2009-05-271-4/+25
| | | | | | | | | | | | | beyond their associated static array type. I believe that this fixes a legitimate bug, because BasicAliasAnalysis already has code to check for this condition that works for non-constant indices, however it was missing the case of constant indices. With this change, it checks for both. This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href. llvm-svn: 72451
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-1/+1
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Generalize some alias analysis logic from atomicDuncan Sands2009-02-141-51/+0
| | | | | | intrinsics to any IntrWriteArgMem intrinsics. llvm-svn: 64551
* BasicAA was making the assumption that a local allocation which hadn't escapedNick Lewycky2009-02-131-3/+3
| | | | | | | | couldn't ever be the return of call instruction. However, it's quite possible that said local allocation is itself the return of a function call. That's what malloc and calloc are for, actually. llvm-svn: 64442
* Refactor my previous change to maintain the distinction between ↵Owen Anderson2009-02-051-21/+52
| | | | | | | | AliasAnalysis and BasicAliasAnalysis. This involves some wider changes because it folds away some never-used methods. llvm-svn: 63900
* Finish making AliasAnalysis aware of the fact that most atomic intrinsics ↵Owen Anderson2009-02-041-0/+16
| | | | | | | | only dereference their arguments, and enhance BasicAA to make use of this fact when computing ModRef info. llvm-svn: 63718
* Move isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp sinceDan Gohman2009-02-031-24/+0
| | | | | | | | 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
* Fix a post-RA scheduling dependency bug.Dan Gohman2009-01-301-1/+1
| | | | | | | | | | | | | | | If a MachineInstr doesn't have a memoperand but has an opcode that is known to load or store, assume its memory reference may alias *anything*, including stack slots which the compiler completely controls. To partially compensate for this, teach the ScheduleDAG building code to do basic getUnderlyingValue analysis. This greatly reduces the number of instructions that require restrictive dependencies. This code will need to be revisited when we start doing real alias analysis, but it should suffice for now. llvm-svn: 63370
* BasicAliasAnalysis and FunctionAttrs were bothDuncan Sands2009-01-181-52/+3
| | | | | | | | | doing very similar pointer capture analysis. Factor out the common logic. The new version is from FunctionAttrs since it does a better job than the version in BasicAliasAnalysis llvm-svn: 62461
* add a commentGabor Greif2009-01-181-0/+1
| | | | llvm-svn: 62436
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-1/+1
| | | | | | suggested by Chris. llvm-svn: 62099
* make tblgen autogenerate the nocapture intrinsics for Chris Lattner2009-01-121-4/+0
| | | | | | | llvm.memcpy/memset/memmove. This allows removal of some hackish code from basicaa. llvm-svn: 62071
* When checking if an Argument escapes, check ifDuncan Sands2009-01-051-7/+13
| | | | | | | | the argument is marked nocapture - no need to analyze the argument if the answer is already known! llvm-svn: 61753
* Resubmit support for the 'nocapture' attribute.Nick Lewycky2008-12-191-6/+17
| | | | | | | | | | The problematic part of this patch is that we were out of attribute bits, requiring some fancy bit hacking to make it fit (by shrinking alignment) without breaking existing users or the file format. This change will require users to rebuild llvm-gcc to match llvm. llvm-svn: 61239
* Temporarily revert r61019, r61030, and r61040. These were breaking LLVM ReleaseBill Wendling2008-12-161-17/+6
| | | | | | builds. llvm-svn: 61094
* Teach basicaa to use the nocapture attribute when possible. When theChris Lattner2008-12-151-6/+17
| | | | | | intrinsics are properly marked nocapture, the fixme should be addressed. llvm-svn: 61040
* Allow basicaa to walk through geps with identical indices in Chris Lattner2008-12-101-18/+32
| | | | | | | | | | | parallel, allowing it to decide that P/Q must alias if A/B must alias in things like: P = gep A, 0, i, 1 Q = gep B, 0, i, 1 This allows GVN to delete 62 more instructions out of 403.gcc. llvm-svn: 60820
* Teach BasicAA::getModRefInfo(CallSite, CallSite) someChris Lattner2008-12-091-4/+20
| | | | | | | | | | | | | | | | | | | | | | tricks based on readnone/readonly functions. Teach memdep to look past readonly calls when analyzing deps for a readonly call. This allows elimination of a few more calls from 403.gcc: before: 63 gvn - Number of instructions PRE'd 153986 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted after: 63 gvn - Number of instructions PRE'd 153991 gvn - Number of instructions deleted 50069 gvn - Number of loads deleted 5 calls isn't much, but this adds plumbing for the next change. llvm-svn: 60794
* Fix comment typo.Duncan Sands2008-12-081-1/+1
| | | | llvm-svn: 60697
* Some minor optimizations for isObjectSmallerThan.Chris Lattner2008-12-081-7/+12
| | | | llvm-svn: 60687
OpenPOWER on IntegriCloud