summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't eliminate objc_retainBlock calls on stack objects if theDan Gohman2011-09-291-8/+29
| | | | | | | objc_retainBlock call is potentially responsible for copying the block to the heap to extend its lifetime. rdar://10209613. llvm-svn: 140814
* Clean up uses of switch instructions so they are not dependent on the ↵Eli Friedman2011-09-292-7/+13
| | | | | | operand ordering. Patch by Stepan Dyatkovskiy. llvm-svn: 140803
* typo + pastoAndrew Trick2011-09-291-2/+2
| | | | llvm-svn: 140769
* LSR: rewrite inner loops only.Andrew Trick2011-09-291-5/+21
| | | | | | | | Rewriting the entire loop nest now requires -enable-lsr-nested. See PR11035 for some performance data. A few unit tests specifically test nested LSR, and are now under a flag. llvm-svn: 140762
* indvars should hoist [sz]ext because licm is not rerun.Andrew Trick2011-09-281-17/+27
| | | | llvm-svn: 140670
* Stop emitting instructions with the name "tmp" they eat up memory and have ↵Benjamin Kramer2011-09-2713-102/+79
| | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
* Split the landing pad basic block with the correct function. Also merge theBill Wendling2011-09-271-3/+23
| | | | | | | split landingpad instructions into a PHI node. PR11016 llvm-svn: 140592
* Disable LSR retry by default.Andrew Trick2011-09-271-0/+16
| | | | | | | Disabling aggressive LSR saves compilation time, and with the new indvars behavior usually improves performance. llvm-svn: 140590
* LSR, one of the new Cost::isLoser() checks did not get merged in the ↵Andrew Trick2011-09-261-2/+6
| | | | | | previous checkin. llvm-svn: 140583
* LSR cost metric minor fix and verification.Andrew Trick2011-09-261-3/+26
| | | | | | | | The minor bug heuristic was noticed by inspection. I added the isLoser/isValid helpers because they will become more important with subsequent checkins. llvm-svn: 140580
* LSR minor bug fix in RateRegister.Andrew Trick2011-09-231-1/+1
| | | | | | | No test case. Noticed by inspection and I doubt it ever affects the outcome of the overall heuristic, let alone final codegen. llvm-svn: 140431
* PR10987: add a missed safety check to isSafePHIToSpeculate in scalarrepl.Eli Friedman2011-09-221-7/+11
| | | | llvm-svn: 140327
* Make sure IPSCCP never marks a tracked call as overdefined in ↵Eli Friedman2011-09-201-9/+35
| | | | | | | | SCCPSolver::ResolvedUndefsIn. If we do, we can end up in a situation where a function is resolved to return a constant, but the caller is marked overdefined, which confuses the code later. <rdar://problem/9956541> (again). llvm-svn: 140210
* Relax this condition.Bill Wendling2011-09-201-2/+1
| | | | | | | Some passes require breaking critical edges before they're called. Don't segfault because of that. llvm-svn: 140196
* Place the check for an exit landing pad where it will be run on both code ↵Bill Wendling2011-09-201-6/+15
| | | | | | paths through the if-then-else. llvm-svn: 140195
* Omit extracting a loop if one of the exits is a landing pad.Bill Wendling2011-09-201-5/+11
| | | | | | | | | The landing pad must accompany the invoke when it's extracted. However, if it does, then the loop isn't properly extracted. I.e., the resulting extraction has a loop in it. The extracted function is then extracted, etc. resulting in an infinite loop. llvm-svn: 140193
* Check the terminator, not the basic block.Bill Wendling2011-09-201-1/+2
| | | | llvm-svn: 140176
* When extracting a basic block that ends in an 'invoke' instruction, we need toBill Wendling2011-09-201-7/+46
| | | | | | | | | | extract its associated landing pad block as well. However, that landing pad block may have more than one predecessor. So split the landing pad block so that individual landing pads have only one predecessor. This type of transformation may produce a false positive with bugpoint. llvm-svn: 140173
* Use ArrayRef instead of an explicit 'const std::vector &'.Bill Wendling2011-09-201-3/+3
| | | | llvm-svn: 140172
* If simple ownership works then friendship is not required.Devang Patel2011-09-201-2/+1
| | | | llvm-svn: 140169
* Use ArrayRef instead of 'const std::vector' to pass around the list of basic ↵Bill Wendling2011-09-201-8/+10
| | | | | | blocks to extract. llvm-svn: 140168
* Update GCOVLines to provide interfaces to write line table and calculate ↵Devang Patel2011-09-201-13/+17
| | | | | | complete length. llvm-svn: 140167
* Fix comments.Bill Wendling2011-09-201-4/+4
| | | | llvm-svn: 140164
* Update comment.Devang Patel2011-09-201-2/+1
| | | | llvm-svn: 140156
* Use StringRef instead of std::string.Devang Patel2011-09-201-1/+1
| | | | llvm-svn: 140154
* Eliminate unnecessary copy of FileName from GCOVLines. Devang Patel2011-09-201-7/+6
| | | | | | GCOVLines is always accessed through a StringMap where the key is FileName. llvm-svn: 140151
* There is no need to write a local utility routine to find subprogram info if ↵Devang Patel2011-09-201-10/+1
| | | | | | the utility routine is already available in DebugInfo. llvm-svn: 140145
* Revert r140083 and r140084 until buildbots can be fixed.Bill Wendling2011-09-191-8/+1
| | | | llvm-svn: 140094
* If we are extracting a basic block that ends in an invoke call, we must alsoBill Wendling2011-09-191-1/+8
| | | | | | | | | | extract the landing pad block. Otherwise, there will be a situation where the invoke's unwind edge lands on a non-landing pad. We also forbid the user from extracting the landing pad block by itself. Again, this is not a valid transformation. llvm-svn: 140083
* Fix an infinite loop where a transform in InstCombiner::visitAnd claims a ↵Eli Friedman2011-09-191-21/+22
| | | | | | | | construct is changed when it is not. (See included testcase.) Patch by Xiaoyi Guo. llvm-svn: 140072
* [indvars] Fix PR10946: SCEV cannot handle Vector IVs.Andrew Trick2011-09-191-0/+6
| | | | llvm-svn: 140026
* Reapply r139759. Disable IV rewriting by default. See PR10916.Andrew Trick2011-09-151-1/+1
| | | | llvm-svn: 139842
* Make demanded-elt simplification for shufflevector slightly stronger. ↵Eli Friedman2011-09-151-0/+3
| | | | | | Spotted by inspection. llvm-svn: 139768
* Don't mark objc_retainBlock as nounwind. It calls user copy constructorsDan Gohman2011-09-141-2/+4
| | | | | | which could theoretically throw. llvm-svn: 139710
* objc_retainBlock is not NoModRef because it can update forwarding pointersDan Gohman2011-09-141-1/+2
| | | | | | in memory relevant to the optimizer. rdar://10050579. llvm-svn: 139708
* [indvars] Revert r139579 until 401.bzip -arch i386 miscompilation is fixed. ↵Andrew Trick2011-09-131-1/+1
| | | | | | PR10920. llvm-svn: 139583
* Disable IV rewriting by default. See PR10916.Andrew Trick2011-09-131-1/+1
| | | | llvm-svn: 139579
* [indvars] Fix bugs in floating point IV range checks noticed by inspection.Andrew Trick2011-09-131-10/+10
| | | | llvm-svn: 139574
* Add comment to clarify the behavior of a helper in DSE.Eli Friedman2011-09-131-0/+2
| | | | llvm-svn: 139571
* Correct grammar.Eli Friedman2011-09-131-1/+1
| | | | llvm-svn: 139565
* Change a bunch of isVolatile() checks to check for atomic load/store as well.Eli Friedman2011-09-125-19/+19
| | | | | | | | No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic. I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly. I'm going to try and come up with some additional testing, though. llvm-svn: 139533
* Rename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for ↵Andrew Trick2011-09-121-42/+20
| | | | | | default change. llvm-svn: 139517
* [disable-iv-rewrite] Allow WidenIV to handle NSW/NUW operationsAndrew Trick2011-09-101-1/+40
| | | | | | | | | | | | better. Don't immediately give up when an add operation can't be trivially sign/zero-extended within a loop. If it has NSW/NUW flags, generate a new expression with sign extended (non-recurrent) operand. As before, if SCEV says that all sign extends are loop invariant, then we can widen the operation. llvm-svn: 139453
* Comment formatting.Andrew Trick2011-09-091-15/+16
| | | | llvm-svn: 139375
* Add -verify-indvars for imperfect SCEV trip count verification after indvars.Andrew Trick2011-09-061-1/+9
| | | | llvm-svn: 139169
* Use IRBuilder.Devang Patel2011-09-061-17/+14
| | | | llvm-svn: 139156
* Try again at r138809 (make DSE more aggressive in removing dead stores at ↵Owen Anderson2011-09-061-79/+80
| | | | | | the end of a function), now with less deleting stores before memcpy's. llvm-svn: 139150
* Split the init.trampoline intrinsic, which currently combines GCC'sDuncan Sands2011-09-062-11/+90
| | | | | | | | | | | | | | | | | | | | init.trampoline and adjust.trampoline intrinsics, into two intrinsics like in GCC. While having one combined intrinsic is tempting, it is not natural because typically the trampoline initialization needs to be done in one function, and the result of adjust trampoline is needed in a different (nested) function. To get around this llvm-gcc hacks the nested function lowering code to insert an additional parent variable holding the adjust.trampoline result that can be accessed from the child function. Dragonegg doesn't have the luxury of tweaking GCC code, so it stored the result of adjust.trampoline in the memory GCC set aside for the trampoline itself (this is always available in the child function), and set up some new memory (using an alloca) to hold the trampoline. Unfortunately this breaks Go which allocates trampoline memory on the heap and wants to use it even after the parent has exited (!). Rather than doing even more hacks to get Go working, it seemed best to just use two intrinsics like in GCC. Patch mostly by Sanjoy Das. llvm-svn: 139140
* Delete trivial landing pads that just continue unwinding the caughtDuncan Sands2011-09-051-0/+49
| | | | | | exception. llvm-svn: 139117
* Use Duncan's patch to delete the instructions in reverse order (minus the ↵Bill Wendling2011-09-042-12/+20
| | | | | | landingpad and terminator). llvm-svn: 139090
OpenPOWER on IntegriCloud