summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* use Value* constructor of CallSite to create potentially improper site, and ↵Gabor Greif2010-07-281-2/+1
| | | | | | test that llvm-svn: 109581
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-1/+1
| | | | llvm-svn: 109045
* Don't claim to preserve AliasAnalysis. First, this is doesn't actuallyDan Gohman2010-07-021-1/+0
| | | | | | | have any effect, and second, deleting stores can potentially invalidate an AliasAnalysis, and there's currently no notification for this. llvm-svn: 107496
* use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be ↵Gabor Greif2010-06-251-5/+7
| | | | | | able to use isFreeCall whithout a cast or new overload llvm-svn: 106823
* use ArgOperand API; introduce downcasted pointers into scope to facilitate thisGabor Greif2010-06-241-7/+9
| | | | llvm-svn: 106734
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-15/+15
| | | | llvm-svn: 106542
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-6/+6
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-6/+6
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-6/+6
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-6/+6
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-6/+6
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-6/+6
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Make DSE only scan blocks that are reachable from the entryChris Lattner2010-02-111-1/+7
| | | | | | | | | block. Other blocks may have pointer cycles that will crash basicaa and other alias analyses. In any case, there is no point wasting cycles optimizing dead blocks. This fixes rdar://7635088 llvm-svn: 95852
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-051-4/+3
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* Small cleanups, refactor some duplicated code into a single method. NoNick Lewycky2010-01-031-44/+35
| | | | | | functionality change. llvm-svn: 92445
* formatting cleanups.Chris Lattner2009-12-021-20/+22
| | | | llvm-svn: 90298
* Add defensive break.Duncan Sands2009-11-101-0/+1
| | | | llvm-svn: 86705
* Fix obvious typo.Duncan Sands2009-11-101-1/+1
| | | | llvm-svn: 86694
* Teach DSE to eliminate useless trampolines.Duncan Sands2009-11-101-6/+19
| | | | llvm-svn: 86683
* Simplify.Nick Lewycky2009-11-101-3/+1
| | | | llvm-svn: 86668
* Reapply r86359, "Teach dead store elimination that certain intrinsics write toNick Lewycky2009-11-101-63/+118
| | | | | | | memory just like a store" with bug fixed (partial-overwrite.ll is the regression test). llvm-svn: 86667
* Revert r86359, it is breaking the self host on theChris Lattner2009-11-071-117/+62
| | | | | | llvm-gcc-i386-darwin9 build bot. llvm-svn: 86391
* Teach dead store elimination that certain intrinsics write to memory just likeNick Lewycky2009-11-071-62/+117
| | | | | | a store. llvm-svn: 86359
* improve DSE when TargetData is not around, based on work byChris Lattner2009-11-041-3/+16
| | | | | | Hans Wennborg! llvm-svn: 86067
* Treat lifetime begin/end markers as allocations/frees respectively for theOwen Anderson2009-10-281-0/+20
| | | | | | purposes for GVN/DSE. llvm-svn: 85383
* 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-4/+3
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-6/+8
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* fix PR4815: some cases where DeleteDeadInstruction can deleteChris Lattner2009-09-021-3/+13
| | | | | | the instruction BBI points to. llvm-svn: 80768
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-2/+1
| | | | llvm-svn: 80766
* Fix this condition I accidentally inverted.Dan Gohman2009-07-241-1/+1
| | | | llvm-svn: 76988
* Convert several more passes to use getAnalysisIfAvailable<TargetData>()Dan Gohman2009-07-241-22/+26
| | | | | | instead of getAnalysis<TargetData>(). llvm-svn: 76982
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-4/+4
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-4/+4
| | | | | | suggested by Chris. llvm-svn: 62099
* don't bother touching volatile stores, they will just return clobber onChris Lattner2008-12-071-0/+5
| | | | | | everything interesting anyway. llvm-svn: 60640
* Reimplement the inner loop of DSE. It now uniformly uses getDependence(),Chris Lattner2008-12-061-84/+44
| | | | | | | | doesn't do its own local caching, and is slightly more aggressive about free/store dse (see testcase). This eliminates the last external client of MemDep::getDependenceFrom(). llvm-svn: 60619
* Make a few major changes to memdep and its clients:Chris Lattner2008-12-051-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Merge the 'None' result into 'Normal', making loads and stores return their dependencies on allocations as Normal. 2. Split the 'Normal' result into 'Clobber' and 'Def' to distinguish between the cases when memdep knows the value is produced from when we just know if may be changed. 3. Move some of the logic for determining whether readonly calls are CSEs into memdep instead of it being in GVN. This still leaves verification that the arguments are hte same to GVN to let it know about value equivalences in different contexts. 4. Change memdep's call/call dependency analysis to use getModRefInfo(CallSite,CallSite) instead of doing something very weak. This only really matters for things like DSA, but someday maybe we'll have some other decent context sensitive analyses :) 5. This reimplements the guts of memdep to handle the new results. 6. This simplifies GVN significantly: a) readonly call CSE is slightly simpler b) I eliminated the "getDependencyFrom" chaining for load elimination and load CSE doesn't have to worry about volatile (they are always clobbers) anymore. c) GVN no longer does any 'lastLoad' caching, leaving it to memdep. 7. The logic in DSE is simplified a bit and sped up. A potentially unsafe case was eliminated. llvm-svn: 60607
* Fix a thinko that manifested as a crash on clamav last night.Chris Lattner2008-11-291-2/+2
| | | | llvm-svn: 60251
* Split getDependency into getDependency and getDependencyFrom, the Chris Lattner2008-11-291-1/+1
| | | | | | | former does caching, the later doesn't. This dramatically simplifies the logic in getDependency and getDependencyFrom. llvm-svn: 60234
* Introduce and use a new MemDepResult class to hold the results of a memdepChris Lattner2008-11-291-20/+11
| | | | | | | | | | | query. This makes it crystal clear what cases can escape from MemDep that the clients have to handle. This also gives the clients a nice simplified interface to it that is easy to poke at. This patch also makes DepResultTy and MemoryDependenceAnalysis::DepType private, yay. llvm-svn: 60231
* Reimplement the internal abstraction used by MemDep in termsChris Lattner2008-11-291-15/+16
| | | | | | | | | | | | | | | of a pointer/int pair instead of a manually bitmangled pointer. This forces clients to think a little more about checking the appropriate pieces and will be useful for internal implementation improvements later. I'm not particularly happy with this. After going through this I don't think that the clients of memdep should be exposed to the internal type at all. I'll fix this in a subsequent commit. This has no functionality change. llvm-svn: 60230
* don't revisit instructions off the beginning of the block.Chris Lattner2008-11-281-2/+4
| | | | llvm-svn: 60221
* simplify some code, remove escaped newline.Chris Lattner2008-11-281-22/+28
| | | | llvm-svn: 60213
* rewrite a big chunk of how DSE does recursive dead operand Chris Lattner2008-11-281-181/+105
| | | | | | | elimination to use more modern infrastructure. Also do a bunch of small cleanups. llvm-svn: 60201
* Factorize code: remove variants of "strip offDuncan Sands2008-10-011-39/+16
| | | | | | | | | | | pointer bitcasts and GEP's", and centralize the logic in Value::getUnderlyingObject. The difference with stripPointerCasts is that stripPointerCasts only strips GEPs if all indices are zero, while getUnderlyingObject strips GEPs no matter what the indices are. llvm-svn: 56922
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
OpenPOWER on IntegriCloud