summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/DeadStoreElimination
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach GetUnderlyingObject / BasicAA about addrspacecastMatt Arsenault2014-07-152-3/+36
| | | | llvm-svn: 213025
* Update optimization passes to handle inalloca argumentsReid Kleckner2014-01-281-0/+9
| | | | | | | | | | | | | | | Summary: I searched Transforms/ and Analysis/ for 'ByVal' and updated those call sites to check for inalloca if appropriate. I added tests for any change that would allow an optimization to fire on inalloca. Reviewers: nlewycky Differential Revision: http://llvm-reviews.chandlerc.com/D2449 llvm-svn: 200281
* Debug Info: update testing cases to specify the debug info version number.Manman Ren2013-11-221-1/+2
| | | | | | | | We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. llvm-svn: 195504
* Fixing a heisenbug where the memory dependence analysis behaves differentlyYunzhong Gao2013-11-141-0/+260
| | | | | | | | | | | | with and without -g. Adding a test case to make sure that the threshold used in the memory dependence analysis is respected. The test case also checks that debug intrinsics are not counted towards this threshold. Differential Revision: http://llvm-reviews.chandlerc.com/D2141 llvm-svn: 194646
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-1/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Catch more CHECK that can be converted to CHECK-LABEL in Transforms for ↵Stephen Lin2013-07-142-4/+4
| | | | | | | | | | | | | | | | | | | | | | easier debugging. No functionality change. This conversion was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done llvm-svn: 186269
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-148-53/+53
| | | | | | | | | | | | | | | | | | | | | | functionality change. This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done llvm-svn: 186268
* TBAA: remove !tbaa from testing cases if not used.Manman Ren2013-04-301-7/+3
| | | | | | | This will make it easier to turn on struct-path aware TBAA since the metadata format will change. llvm-svn: 180796
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2013-01-013-3/+3
| | | | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. My previous regex was not good enough to find these. llvm-svn: 171343
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-301-1/+1
| | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171246
* Make this test check the transforms it's actually doing. Also add a test that itNick Lewycky2012-09-251-3/+17
| | | | | | doesn't transform the trivially unsafe case. llvm-svn: 164617
* Don't forget that strcpy and friends return a pointer to the destination, soNick Lewycky2012-09-251-0/+10
| | | | | | it's not a dead store if that pointer is used. Whoops! llvm-svn: 164583
* Teach DSE that strcpy, strncpy, strcat and strncat are all stores which may beNick Lewycky2012-09-241-0/+46
| | | | | | dead. llvm-svn: 164561
* Fix more fallout from r158919, similar to PR13547.Bob Wilson2012-09-031-0/+14
| | | | | | | | | This code used to only handle malloc-like calls, which do not read memory. r158919 changed it to check isNoAliasFn(), which includes strdup-like and realloc-like calls, but it was not checking for dependencies on the memory read by those calls. llvm-svn: 163106
* Change greater than to greater than or equal so that an identical sized ↵Craig Topper2012-08-141-0/+19
| | | | | | store to the same offset is treated as completing overwriting. llvm-svn: 161857
* isAllocLikeFn is allowed to return true for functions which read memory; makeEli Friedman2012-08-081-0/+15
| | | | | | | sure we account for that correctly in DeadStoreElimination. Fixes a regression from r158919. PR13547. llvm-svn: 161468
* Teach DeadStoreElimination to eliminate exit-block stores with phi addresses.Dan Gohman2012-05-101-0/+10
| | | | llvm-svn: 156558
* teach DSE and isInstructionTriviallyDead() about callocNuno Lopes2012-05-101-1/+9
| | | | llvm-svn: 156553
* Reverted r152620 - DSE: Shorten memset when a later store overwrites the ↵Pete Cooper2012-02-281-71/+0
| | | | | | start of it. There were all sorts of buildbot issues llvm-svn: 151621
* DSE: Shorten memset when a later store overwrites the start of itPete Cooper2012-02-281-0/+71
| | | | llvm-svn: 151620
* Add testcase for the previous commit.Rafael Espindola2012-02-261-0/+25
| | | | llvm-svn: 151475
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Fix infinite loop in DSE when deleting a free in a reachable loop that's alsoNick Lewycky2011-12-081-0/+10
| | | | | | trivially infinite. llvm-svn: 146197
* Fixed deadstoreelimination bug where negative indices were incorrectly ↵Pete Cooper2011-12-031-0/+17
| | | | | | | | | | causing the optimisation to occur Turns out long long + unsigned long long is unsigned. Doh! Fixes http://llvm.org/bugs/show_bug.cgi?id=11455 llvm-svn: 145731
* Fix typo in test.Nick Lewycky2011-11-161-1/+1
| | | | llvm-svn: 144774
* Merge isObjectPointerWithTrustworthySize with getPointerSize. Use it whenNick Lewycky2011-11-161-0/+38
| | | | | | looking at the size of the pointee. Fixes PR11390! llvm-svn: 144773
* DeadStoreElimination can now trim the size of a store if the end of the ↵Pete Cooper2011-11-091-0/+78
| | | | | | | | | | | store is dead. Currently checks alignment and killing stores on a power of 2 boundary as this is likely to trim the size of the earlier store without breaking large vector stores into scalar ones. Fixes <rdar://problem/10140300> llvm-svn: 144239
* Do simple cross-block DSE when we encounter a free statement. Fixes PR11240.Nick Lewycky2011-11-051-4/+22
| | | | llvm-svn: 143808
* Speculatively revert "DeadStoreElimination can now trim the size of a store ifDaniel Dunbar2011-11-041-78/+0
| | | | | | the end of it is dead.", which appears to break bootstrapping LLVM. llvm-svn: 143668
* DeadStoreElimination can now trim the size of a store if the end of it is dead.Pete Cooper2011-11-031-0/+78
| | | | | | | | | | Only currently done if the later store is writing to a power of 2 address or has the same alignment as the earlier store as then its likely to not break up large stores into smaller ones Fixes <rdar://problem/10140300> llvm-svn: 143630
* A dead malloc, a free(NULL) and a free(undef) are all trivially deadNick Lewycky2011-10-241-2/+1
| | | | | | | | | | instructions. This doesn't introduce any optimizations we weren't doing before (except potentially due to pass ordering issues), now passes will eliminate them sooner as part of their own cleanups. llvm-svn: 142787
* A non-escaping malloc in the entry block is not unlike an alloca. Do dead-storeNick Lewycky2011-10-221-0/+8
| | | | | | elimination on them too. llvm-svn: 142735
* Try again at r138809 (make DSE more aggressive in removing dead stores at ↵Owen Anderson2011-09-062-0/+112
| | | | | | the end of a function), now with less deleting stores before memcpy's. llvm-svn: 139150
* Remove empty file.Owen Anderson2011-08-301-0/+0
| | | | llvm-svn: 138830
* Speculatively revert r138809 in an attempt to fix DragonEgg.Owen Anderson2011-08-301-27/+0
| | | | llvm-svn: 138829
* When walking backwards to eliminate final stores to allocas at the end of a ↵Owen Anderson2011-08-301-0/+27
| | | | | | function, encountering an unrelated store should not cause us to give up like encountering a load does. llvm-svn: 138809
* Atomic load/store handling for the passes using memdep (GVN, DSE, memcpyopt).Eli Friedman2011-08-171-0/+107
| | | | llvm-svn: 137888
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-4/+4
| | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-184-22/+20
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-171-2/+4
| | | | | | are either unreduced or only test old syntax. llvm-svn: 133228
* fix a really nasty basicaa mod/ref calculation bug that was causing ↵Chris Lattner2011-05-231-0/+17
| | | | | | | | miscompilation of UnitTests/ObjC/messages-2.m with the recent optimizer improvements. llvm-svn: 131897
* * The DSE code that tested for overlapping needed to take into account the factBill Wendling2011-03-301-0/+1
| | | | | | | | | | | | that one of the numbers is signed while the other is unsigned. This could lead to a wrong result when the signed was promoted to an unsigned int. * Add the data layout line to the testcase so that it will test the appropriate thing. Patch by David Terei! llvm-svn: 128577
* PR9561: A store with a negative offset (via GEP) could erroniously say that itBill Wendling2011-03-261-0/+22
| | | | | | | completely overlaps a previous store, thus mistakenly deleting that store. Check for this condition. llvm-svn: 128319
* Fix PR8728, a miscompilation I recently introduced. When optimizingChris Lattner2010-12-061-1/+15
| | | | | | | | | | | | | | | | | | | | | memcpy's like: memcpy(A, B) memcpy(A, C) we cannot delete the first memcpy as dead if A and C might be aliases. If so, we actually get: memcpy(A, B) memcpy(A, A) which is not correct to transform into: memcpy(A, A) This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks Jakub! llvm-svn: 120974
* Enhance DSE to handle the variable index case in PR8657.Chris Lattner2010-11-301-0/+17
| | | | llvm-svn: 120498
* teach DSE to use GetPointerBaseWithConstantOffset to analyzeChris Lattner2010-11-301-0/+16
| | | | | | | | may-aliasing stores that partially overlap with different base pointers. This implements PR6043 and the non-variable part of PR8657 llvm-svn: 120485
* enhance isRemovable to refuse to delete volatile mem transfersChris Lattner2010-11-301-4/+16
| | | | | | | now that DSE hacks on them. This fixes a regression I introduced, by generalizing DSE to hack on transfers. llvm-svn: 120445
* Rewrite the main DSE loop to be written in terms of reasoningChris Lattner2010-11-301-0/+33
| | | | | | | | | | | | | | about pairs of AA::Location's instead of looking for MemDep's "Def" predicate. This is more powerful and general, handling memset/memcpy/store all uniformly, and implementing PR8701 and probably obsoleting parts of memcpyoptimizer. This also fixes an obscure bug with init.trampoline and i8 stores, but I'm not surprised it hasn't been hit yet. Enhancing init.trampoline to carry the size that it stores would allow DSE to be much more aggressive about optimizing them. llvm-svn: 120406
* merge one more awayChris Lattner2010-11-302-9/+12
| | | | llvm-svn: 120375
* I already merged partial-overwrite.ll -> PartialStore.llChris Lattner2010-11-303-29/+20
| | | | | | Merge context-sensitive.ll -> simple.ll and upgrade it. llvm-svn: 120374
OpenPOWER on IntegriCloud