Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Go back to passing the analyses around as parameters. | Owen Anderson | 2008-05-12 | 1 | -21/+33 |
| | | | | llvm-svn: 50995 | ||||
* | Move the various analyses used by GVN into static variables so we don't have ↵ | Owen Anderson | 2008-05-12 | 1 | -30/+21 |
| | | | | | | to keep passing them around or refetching them. llvm-svn: 50963 | ||||
* | Fix various DOUTs to not call the extremely expensive Value::getName() | Chris Lattner | 2008-05-11 | 1 | -5/+5 |
| | | | | | | | | method. DOUT statements are disabled when assertions are off, but the side effects of getName() are still evaluated. Just call getNameSTart, which is close enough and doesn't cause heap traffic. llvm-svn: 50958 | ||||
* | Simplify code by using SwitchInst::findCaseValue instead of reimplementing it. | Chris Lattner | 2008-05-10 | 1 | -14/+2 |
| | | | | llvm-svn: 50957 | ||||
* | don't sink invokes, even if they are readonly. This fixes a | Chris Lattner | 2008-05-09 | 1 | -1/+2 |
| | | | | | | crash on kimwitu++. llvm-svn: 50901 | ||||
* | Fix a type and formatting. | Duncan Sands | 2008-05-09 | 1 | -2/+2 |
| | | | | llvm-svn: 50900 | ||||
* | Implement PR2298. This transforms: | Chris Lattner | 2008-05-09 | 1 | -0/+13 |
| | | | | | | | ~x < ~y --> y < x -x == -y --> x == y llvm-svn: 50882 | ||||
* | restore doxygen comment. | Chris Lattner | 2008-05-09 | 1 | -17/+16 |
| | | | | llvm-svn: 50881 | ||||
* | Improve pass documentation and comments. | Gordon Henriksen | 2008-05-08 | 5 | -26/+38 |
| | | | | | | Patch by Matthijs Kooijman! llvm-svn: 50861 | ||||
* | More than just loads can read from memory: readonly calls like strlen | Chris Lattner | 2008-05-08 | 1 | -4/+4 |
| | | | | | | | also need to be checked for memory modifying instructions before we can sink them. THis fixes the second half of PR2297. llvm-svn: 50860 | ||||
* | Make instcombine's DSE respect loads as well as stores. It is not safe to | Chris Lattner | 2008-05-08 | 1 | -1/+1 |
| | | | | | | | | | | | | delete the first store in: store x -> p load p store y -> p This is for PR2297. llvm-svn: 50859 | ||||
* | Check linkage. | Devang Patel | 2008-05-08 | 1 | -1/+1 |
| | | | | llvm-svn: 50851 | ||||
* | Turn StripPointerCast() into a method | Anton Korobeynikov | 2008-05-07 | 1 | -1/+1 |
| | | | | llvm-svn: 50836 | ||||
* | Fix a bug in the ComputeMaskedBits logic for multiply. | Dan Gohman | 2008-05-07 | 1 | -2/+2 |
| | | | | llvm-svn: 50793 | ||||
* | Make StripPointerCast a common function (should we mak it method of Value ↵ | Anton Korobeynikov | 2008-05-06 | 1 | -2/+1 |
| | | | | | | instead?) llvm-svn: 50775 | ||||
* | We need to update PHIs containing the exiting block, not the exit block. We ↵ | Owen Anderson | 2008-05-06 | 1 | -3/+8 |
| | | | | | | really should come up with better names for these. llvm-svn: 50770 | ||||
* | Fix typo. | Devang Patel | 2008-05-06 | 1 | -1/+1 |
| | | | | llvm-svn: 50713 | ||||
* | fix typo Duncan noticed | Chris Lattner | 2008-05-06 | 1 | -1/+1 |
| | | | | llvm-svn: 50699 | ||||
* | Make several variable declarations static. | Dan Gohman | 2008-05-06 | 8 | -10/+10 |
| | | | | llvm-svn: 50696 | ||||
* | Remove uses of llvm/System/IncludeFile.h that are no longer needed. | Dan Gohman | 2008-05-06 | 1 | -2/+0 |
| | | | | llvm-svn: 50695 | ||||
* | Correct the value of LowBits in srem and urem handling in | Dan Gohman | 2008-05-06 | 1 | -6/+6 |
| | | | | | | ComputeMaskedBits. llvm-svn: 50692 | ||||
* | Fix: Some classes were derived from a class in an anonymous namespace, but they | Bill Wendling | 2008-05-05 | 1 | -0/+2 |
| | | | | | | themselves weren't in the anonymous namespace. llvm-svn: 50673 | ||||
* | Fix a crash when threading a block that includes a MRV call result. | Chris Lattner | 2008-05-05 | 1 | -4/+19 |
| | | | | | | | | | DemoteRegToStack doesn't work with MRVs yet, because it relies on the ability to load/store things. This fixes PR2285. llvm-svn: 50667 | ||||
* | processStore may delete the instruction, avoid | Torok Edwin | 2008-05-04 | 1 | -2/+1 |
| | | | | | | using dyn_cast<> on already freed memory. llvm-svn: 50618 | ||||
* | Handle multiple return values. | Devang Patel | 2008-05-03 | 1 | -1/+23 |
| | | | | llvm-svn: 50604 | ||||
* | Do not sink getresult. | Devang Patel | 2008-05-03 | 1 | -1/+3 |
| | | | | llvm-svn: 50600 | ||||
* | Fix a mistake in the computation of leading zeros for udiv. | Dan Gohman | 2008-05-02 | 1 | -3/+5 |
| | | | | llvm-svn: 50591 | ||||
* | strength reduce exp2 into ldexp, rdar://5852514 | Chris Lattner | 2008-05-02 | 1 | -1/+52 |
| | | | | llvm-svn: 50586 | ||||
* | add a FIXME so we remember to eventually remove this code. | Chris Lattner | 2008-05-02 | 1 | -5/+6 |
| | | | | llvm-svn: 50582 | ||||
* | Porting r50563 from Tak to mainline. | Bill Wendling | 2008-05-02 | 1 | -0/+5 |
| | | | | llvm-svn: 50564 | ||||
* | Don't try to create PHIs of struct types. Fallout | Dale Johannesen | 2008-05-01 | 1 | -8/+31 |
| | | | | | | from x86-64 calling convention work. llvm-svn: 50545 | ||||
* | Fix an overaggressive SimplifyDemandedBits optimization on urem. This | Dan Gohman | 2008-05-01 | 1 | -4/+5 |
| | | | | | | fixes the 254.gap regression on x86 and the 403.gcc regression on x86-64. llvm-svn: 50537 | ||||
* | 1) add '-debug' output | Chris Lattner | 2008-05-01 | 1 | -11/+19 |
| | | | | | | | 2) Return NULL instead of false in several places for tidiness. 3) fix a bug optimizing sprintf(p, "%c", x) llvm-svn: 50521 | ||||
* | Delete the IPO simplify-libcalls and completely reimplement it as | Chris Lattner | 2008-05-01 | 2 | -2214/+1437 |
| | | | | | | | | a FunctionPass. This makes it simpler, fixes dozens of bugs, adds a couple of minor features, and shrinks is considerably: from 2214 to 1437 lines. llvm-svn: 50520 | ||||
* | This condition got inverted accidentally. | Owen Anderson | 2008-04-30 | 1 | -1/+1 |
| | | | | llvm-svn: 50473 | ||||
* | move lowering of llvm.memset -> store from simplify libcalls | Chris Lattner | 2008-04-30 | 1 | -7/+49 |
| | | | | | | to instcombine. llvm-svn: 50472 | ||||
* | use string length computation to generalize several xforms. | Chris Lattner | 2008-04-30 | 1 | -36/+39 |
| | | | | llvm-svn: 50464 | ||||
* | Revert r50441. The original code was correct. Add some more comments so ↵ | Owen Anderson | 2008-04-29 | 1 | -3/+9 |
| | | | | | | that I don't make the same mistake in the future. llvm-svn: 50446 | ||||
* | Fix a bug in memcpyopt where the memcpy-memcpy transform was never being ↵ | Owen Anderson | 2008-04-29 | 1 | -4/+6 |
| | | | | | | | | | applied because we were checking for it in the wrong order. This caused a miscompilation because the return slot optimization assumes that the call it is dealing with is NOT a memcpy. llvm-svn: 50444 | ||||
* | We should be returning true here since we've changed the function. | Owen Anderson | 2008-04-29 | 1 | -1/+1 |
| | | | | llvm-svn: 50442 | ||||
* | A lot of cleanups and documentation improvements, as well as a few corner ↵ | Owen Anderson | 2008-04-29 | 1 | -59/+76 |
| | | | | | | | | case fixes. Most of this was suggested by Chris. llvm-svn: 50441 | ||||
* | Rename DeadLoopElimination to LoopDeletion, part 2. | Owen Anderson | 2008-04-29 | 1 | -14/+12 |
| | | | | llvm-svn: 50437 | ||||
* | Rename DeadLoopElimination to LoopDeletion, part one. | Owen Anderson | 2008-04-29 | 1 | -0/+0 |
| | | | | llvm-svn: 50436 | ||||
* | don't eliminate load from volatile value on paths where the load is dead. | Chris Lattner | 2008-04-29 | 1 | -0/+9 |
| | | | | | | This fixes the second half of PR2262 llvm-svn: 50430 | ||||
* | fix a subtle volatile handling bug. | Chris Lattner | 2008-04-29 | 1 | -7/+12 |
| | | | | llvm-svn: 50428 | ||||
* | Implement more aggressive support for analyzing string length. This | Chris Lattner | 2008-04-29 | 1 | -10/+136 |
| | | | | | | | | | | generalizes the previous code to handle the case when the string is not an immediate to the strlen call (for example, crazy stuff like strlen(c ? "foo" : "bart"+1) -> 3). This implements gcc.c-torture/execute/builtins/strlen-2.c. I will generalize other cases in simplifylibcalls to use the same routine later. llvm-svn: 50408 | ||||
* | Clarify what we mean by a dead loop. | Owen Anderson | 2008-04-29 | 1 | -0/+4 |
| | | | | llvm-svn: 50406 | ||||
* | don't delete the last store to an alloca if the store is volatile. | Chris Lattner | 2008-04-29 | 1 | -1/+1 |
| | | | | llvm-svn: 50390 | ||||
* | Add some more comments. | Owen Anderson | 2008-04-29 | 1 | -0/+21 |
| | | | | llvm-svn: 50384 | ||||
* | Remove debugging code. | Owen Anderson | 2008-04-29 | 1 | -4/+0 |
| | | | | llvm-svn: 50383 |