summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix an issue where GVN was performing the return slot optimization when it wasOwen Anderson2008-02-251-8/+26
| | | | | | | not safe. This is fixed by more aggressively checking that the return slot is not used elsewhere in the function. llvm-svn: 47544
* Fix an issue where GVN would try to use an instruction before its definition ↵Owen Anderson2008-02-251-0/+7
| | | | | | when performing return slot optimization. llvm-svn: 47541
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-225-5/+5
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
* Fixed a typo.Zhou Sheng2008-02-221-1/+1
| | | | llvm-svn: 47478
* Add explicit keywords.Dan Gohman2008-02-201-1/+1
| | | | llvm-svn: 47382
* Fix newly-introduced 4.3 warningsAnton Korobeynikov2008-02-202-3/+3
| | | | llvm-svn: 47375
* Get rid of hash_map. Use StringMap insteadAnton Korobeynikov2008-02-201-3/+3
| | | | llvm-svn: 47373
* Make Transforms to be 4.3 warnings-cleanAnton Korobeynikov2008-02-209-39/+58
| | | | llvm-svn: 47371
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-202-1/+3
| | | | | | annoying warnings. llvm-svn: 47367
* When performing return slot optimization, remember to inform memdep when ↵Owen Anderson2008-02-201-0/+1
| | | | | | we're removing the memcpy. llvm-svn: 47364
* Expand ParameterAttributes to 32 bits (in preparationDale Johannesen2008-02-194-19/+31
| | | | | | | for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. llvm-svn: 47342
* remove the LowerSelect pass. The last client was the old Sparc backend, ↵Chris Lattner2008-02-196-110/+0
| | | | | | which is long dead by now. llvm-svn: 47323
* remove the lower packed pass. It can never work and even the parts that Chris Lattner2008-02-191-448/+0
| | | | | | | could work don't work fully. This fixes PR1705. Oh yeah, we don't have packed types anymore either ;-) llvm-svn: 47322
* Refactor this method a bit, and correct a test that was completely wrong but ↵Owen Anderson2008-02-191-7/+11
| | | | | | happened to work out anyways. :-) llvm-svn: 47321
* isa+cast -> dyncast.Chris Lattner2008-02-191-2/+2
| | | | llvm-svn: 47320
* simplify this code again, try 2 :)Chris Lattner2008-02-191-7/+5
| | | | llvm-svn: 47319
* Fix a comment.Owen Anderson2008-02-191-1/+1
| | | | llvm-svn: 47318
* Major improvements to yesterday's return slot optimization. Remove some ↵Owen Anderson2008-02-191-14/+39
| | | | | | | | unneccessary constraints, and add some others that should have been in from the first place. Document the whole thing better. llvm-svn: 47315
* fdiv/frem of undef can produce undef, because the undef operand Chris Lattner2008-02-191-4/+11
| | | | | | | can be a SNaN. We could be more aggressive and turn this into unreachable, but that is less nice, and not really worth it. llvm-svn: 47313
* Factor the profitability check for return slot optimization out into a ↵Owen Anderson2008-02-191-14/+26
| | | | | | | | static function. At some point in the future, this check will become smarter. llvm-svn: 47310
* An sret parameter is required to be the first parameter, so there's no need ↵Owen Anderson2008-02-191-8/+3
| | | | | | | | to loop over all the parameters of the callee looking for it. llvm-svn: 47309
* Cleanup some of my patches from yesterday. Refactor the check for which xformOwen Anderson2008-02-191-22/+23
| | | | | | | to apply to a memcpy into processInstruction. Also, fix a bug in the check due to missing braces. llvm-svn: 47307
* Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the ↵Owen Anderson2008-02-191-1/+2
| | | | | | branches. memcpy's are a kind of CallInst. llvm-svn: 47305
* Correctly fold divide-by-constant, even when faced with overflow.Nick Lewycky2008-02-181-2/+27
| | | | llvm-svn: 47287
* Transforming -A + -B --> -(A + B) isn't safe for FP, thanksChris Lattner2008-02-181-4/+6
| | | | | | to Dale for noticing this! llvm-svn: 47276
* minor code simplification, no functionality change.Chris Lattner2008-02-181-8/+6
| | | | llvm-svn: 47275
* Simplify caller updating using a CallSite, asDuncan Sands2008-02-181-22/+16
| | | | | | | | requested by Chris. While there, do the same for an existing function committed by someone called "lattner" :) llvm-svn: 47273
* Add support to GVN for performing sret return slot optimization. This means ↵Owen Anderson2008-02-181-2/+66
| | | | | | | | | | | that, if an sret function tail calls another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects and optimizes that case. llvm-svn: 47265
* switch simplifycfg from using vectors for most things to smallvectors,Chris Lattner2008-02-181-14/+12
| | | | | | this speeds it up 2.3% on eon. llvm-svn: 47261
* optimize away stackrestore calls that have no intervening alloca or call.Chris Lattner2008-02-181-10/+18
| | | | llvm-svn: 47258
* simplify some code, BreakUpSubtract always returns nonnull now.Chris Lattner2008-02-181-4/+2
| | | | llvm-svn: 47251
* Fold (-x + -y) -> -(x+y) which promotes better association, fixingChris Lattner2008-02-171-2/+10
| | | | | | the second half of PR2047 llvm-svn: 47244
* fix pastoChris Lattner2008-02-171-1/+1
| | | | llvm-svn: 47242
* Split up subtracts into add+negate if they have a reassociable use or operandChris Lattner2008-02-171-5/+8
| | | | | | that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll llvm-svn: 47241
* make the logic for breaking up subtracts more explicit, no Chris Lattner2008-02-171-9/+22
| | | | | | functionality change. llvm-svn: 47239
* Remove any 'nest' parameter attributes if the functionDuncan Sands2008-02-161-10/+52
| | | | | | is not passed as an argument to a trampoline intrinsic. llvm-svn: 47220
* Fix PR2028Devang Patel2008-02-151-2/+2
| | | | llvm-svn: 47150
* If loop header is also loop exiting block then OrigPN is incoming value for ↵Devang Patel2008-02-141-1/+7
| | | | | | | | B loop header. Fixes PR 2030. llvm-svn: 47141
* Fix PR2029Chris Lattner2008-02-141-0/+11
| | | | llvm-svn: 47129
* simplify code, no functionality change.Chris Lattner2008-02-141-7/+9
| | | | llvm-svn: 47116
* Fix PR2032. Inform the alias analysis of changes to the underlying program.Nick Lewycky2008-02-141-0/+2
| | | | llvm-svn: 47111
* A loop latch phi node may have uses inside loop, not just in loop header.Devang Patel2008-02-131-4/+5
| | | | llvm-svn: 47093
* Rename APInt's isPositive to isNonNegative, to reflect what itDan Gohman2008-02-131-6/+6
| | | | | | actually does. llvm-svn: 47090
* While moving exit condition, do not drop loop latch on the floor.Devang Patel2008-02-131-4/+9
| | | | llvm-svn: 47089
* Keep track of exit value operand number when operands are swapped.Devang Patel2008-02-131-1/+6
| | | | llvm-svn: 47082
* remove some dead code.Chris Lattner2008-02-131-4/+0
| | | | llvm-svn: 47066
* Re-apply the patch to improve the optimizations of memcpy's, with severalOwen Anderson2008-02-121-1/+79
| | | | | | bugs fixed. This now passes PPC bootstrap. llvm-svn: 47026
* Fix for bug 1996: optimize out loads of undef. This code basically just Eli Friedman2008-02-121-1/+28
| | | | | | checks for a malloc/alloca immediately followed by a load. llvm-svn: 47006
* Fix scalarrepl to not 'miscompile' undefined code, part #2.Chris Lattner2008-02-101-1/+1
| | | | | | | This fixes the store case, my previous patch just fixed the load case. rdar://5707076. llvm-svn: 46932
* Fix PR 1995.Devang Patel2008-02-081-21/+17
| | | | llvm-svn: 46898
OpenPOWER on IntegriCloud