summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify code. No change in functionality.Benjamin Kramer2010-11-201-1/+1
| | | | llvm-svn: 119908
* slightly simplify code and substantially improve comment. Instead of Chris Lattner2010-11-181-20/+23
| | | | | | saying "it would be bad", give an example of what is going on. llvm-svn: 119695
* remove a pointless restriction from memcpyopt. It wasChris Lattner2010-11-181-4/+7
| | | | | | | | | | | | refusing to optimize two memcpy's like this: copy A <- B copy C <- A if it couldn't prove that noalias(B,C). We can eliminate the copy by producing a memmove instead of memcpy. llvm-svn: 119694
* remove another pointless noalias check: M is a memcpy, so theChris Lattner2010-11-181-2/+1
| | | | | | source and dest are known to not overlap. llvm-svn: 119692
* use AA::isNoAlias instead of open coding it. Remove an extraneous noalias ↵Chris Lattner2010-11-181-11/+7
| | | | | | | | | check: there is no need to check to see if the source and dest of a memcpy are noalias, behavior is undefined if not. llvm-svn: 119691
* rearrange some code, splitting memcpy/memcpy optimizationChris Lattner2010-11-181-45/+56
| | | | | | out of processMemCpy into its own function. llvm-svn: 119687
* Reapply r116831 and r116839, converting AliasAnalysis to useDan Gohman2010-10-191-1/+1
| | | | | | uint64_t, plus fixes for places I missed before. llvm-svn: 116875
* Revert r116831 and r116839, which are breaking selfhost builds.Dan Gohman2010-10-191-1/+1
| | | | llvm-svn: 116858
* Oops, check in all the files for converting AliasAnalysis toDan Gohman2010-10-191-1/+1
| | | | | | use uint64_t. llvm-svn: 116839
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | 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. llvm-svn: 116820
* Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.Dan Gohman2010-10-191-1/+1
| | | | llvm-svn: 116815
* Generalize MemCpyOpt's handling of call slot forwarding to function properly ↵Owen Anderson2010-10-151-18/+48
| | | | | | | | when the call slot forwarding is implemented with a load/store pair rather than a memcpy. llvm-svn: 116637
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-2/+7
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Fix the other half of the alignment changing issue by making sure that theEric Christopher2010-10-011-3/+8
| | | | | | | | memcpy alignment is the minimum of the incoming alignments. Fixes PR 8266. llvm-svn: 115305
* If we're changing the source of a memcpy we need to use the alignmentEric Christopher2010-09-251-3/+5
| | | | | | | | | of the source, not the original alignment since it may no longer be valid. Fixes rdar://8400094 llvm-svn: 114781
* 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
* simplify by using CallSite constructors; virtually eliminates CallSite::get ↵Gabor Greif2010-07-281-5/+6
| | | | | | from the tree llvm-svn: 109687
* recommit simplification (r109502, backed out r109509); seems to innocentGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109510
* back out this too to restore the botsGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109509
* simplifyGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109502
* undo 80 column trespassing I causedGabor Greif2010-07-221-1/+2
| | | | llvm-svn: 109092
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+1
| | | | llvm-svn: 109045
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-2/+2
| | | | llvm-svn: 106542
* use abstract accessors to CallInstGabor Greif2010-04-201-1/+1
| | | | llvm-svn: 101899
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-1/+1
| | | | | | | 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-1/+1
| | | | | | | | | | | | | 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-1/+1
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-1/+1
| | | | | | | | | | | | | 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-1/+1
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-1/+1
| | | | | | | | | | 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
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-041-20/+35
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100304
* Revert r100191 since it breaks objc in clang Mon P Wang2010-04-021-35/+20
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-20/+35
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191
* Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.Bob Wilson2010-03-301-35/+20
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-20/+35
| | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-1/+1
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92760
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-051-2/+1
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* Change errs() to dbgs().David Greene2010-01-051-4/+4
| | | | llvm-svn: 92624
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-1/+1
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-5/+7
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* When extending a memset range past the front, set the alignment of theDan Gohman2009-09-141-0/+1
| | | | | | memset region to the alignment of the new start address. llvm-svn: 81810
* Fix PR4882, by making MemCpyOpt not dereference removed stores to get theChris Lattner2009-09-081-12/+11
| | | | | | | | context for the newly created operations. Patch by Jakub Staszak! llvm-svn: 81175
* Keep track of how many memmove calls were turned intoDuncan Sands2009-09-031-1/+4
| | | | | | memcpy calls. llvm-svn: 80915
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-2/+1
| | | | llvm-svn: 80766
* enhance memcpy opt to turn memmoves into memcpy when the src/destChris Lattner2009-09-011-6/+41
| | | | | | | don't alias. Remove an old and poorly reduced testcase that fails with this transform for reasons unrelated to the original test. llvm-svn: 80693
* random code cleanups, no functionality change.Chris Lattner2009-09-011-63/+62
| | | | llvm-svn: 80682
OpenPOWER on IntegriCloud