summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CaptureTracking.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-251-1/+1
| | | | llvm-svn: 99564
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-1/+1
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Reuse the Threshold value to size these containers because it'sDan Gohman2009-12-091-2/+2
| | | | | | currently somewhat convenient for them to have the same value. llvm-svn: 90980
* Fix a typo in a comment, and adjust SmallSet and SmallVector sizes,Dan Gohman2009-12-091-7/+7
| | | | | | that Chris noticed. llvm-svn: 90910
* Put a threshold on the number of users PointerMayBeCapturedDan Gohman2009-12-081-0/+16
| | | | | | | | | | | | examines; fall back to a conservative answer if there are more. This works around some several compile time problems resulting from BasicAliasAnalysis calling PointerMayBeCaptured. The value has been chosen arbitrarily. This fixes rdar://7438917 and may partially address PR5708. llvm-svn: 90905
* Use stripPointerCasts(). Thanks Duncan!Dan Gohman2009-11-201-1/+1
| | | | llvm-svn: 89472
* Revert the rule that considers comparisons between two pointers in theDan Gohman2009-11-201-9/+4
| | | | | | | | | | | | same object to be a non-capture; Duncan pointed out a way that such a comparison could be a capture. Make the rule that considers a comparison against null more specific, and only consider noalias return values compared against null. This still supports test/Transforms/GVN/nonescaping-malloc.ll, and is not susceptible to the problem Duncan pointed out with noalias arguments. llvm-svn: 89468
* Simplify this code; it's not necessary to check isIdentifiedObject hereDan Gohman2009-11-201-7/+5
| | | | | | | | because if the results from getUnderlyingObject match, the values must be from the same underlying object, even if we don't know what that object is. llvm-svn: 89434
* Refine the capture tracking rules for comparisons to be moreDan Gohman2009-11-201-6/+19
| | | | | | | | | careful about crazy methods of capturing pointers using comparisons. Comparisons of identified objects with null in the default address space are not captures. And, comparisons of two pointers within the same identified object are not captures. llvm-svn: 89421
* Use isVoidTy().Dan Gohman2009-11-201-2/+1
| | | | llvm-svn: 89419
* Refine this to only apply to null in the default address space.Dan Gohman2009-11-191-2/+4
| | | | llvm-svn: 89411
* Extend CaptureTracking to indicate when a value is never stored, evenDan Gohman2009-11-191-2/+9
| | | | | | | | if it is not ultimately captured. Teach BasicAliasAnalysis that a local object address which does not escape and is never stored does not alias with a value resulting from a load. llvm-svn: 89398
* Comparing a pointer with null is not a capture.Dan Gohman2009-11-191-0/+5
| | | | llvm-svn: 89389
* remove a check of isFreeCall: the argument to free is already nocapture so ↵Chris Lattner2009-11-031-4/+0
| | | | | | the generic call code works fine. llvm-svn: 85865
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-271-1/+1
| | | | llvm-svn: 85286
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-261-1/+1
| | | | | | to free() llvm-svn: 85181
* Remove FreeInst.Victor Hernandez2009-10-261-3/+4
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+1
| | | | llvm-svn: 78948
* Revert r70876 and add a testcase (@c7) showing the problem:Duncan Sands2009-05-071-47/+30
| | | | | | | | | | | bits captured, but the pointer marked nocapture. In fact I now recall that this problem is why only readnone functions returning void were considered before! However keep a small fix that was also in r70876: a readnone function returning void can result in bits being captured if it unwinds, so test for this. llvm-svn: 71168
* Teach capture tracking that readonly functions canDuncan Sands2009-05-041-28/+47
| | | | | | | | only capture their arguments by returning them or throwing an exception or not based on the argument value. Patch essentially by Frits van Bommel. llvm-svn: 70876
* BasicAliasAnalysis and FunctionAttrs were bothDuncan Sands2009-01-181-0/+110
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
OpenPOWER on IntegriCloud