summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Go back to passing the analyses around as parameters.Owen Anderson2008-05-121-21/+33
| | | | llvm-svn: 50995
* Move the various analyses used by GVN into static variables so we don't have ↵Owen Anderson2008-05-121-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 Lattner2008-05-111-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 Lattner2008-05-101-14/+2
| | | | llvm-svn: 50957
* don't sink invokes, even if they are readonly. This fixes aChris Lattner2008-05-091-1/+2
| | | | | | crash on kimwitu++. llvm-svn: 50901
* Fix a type and formatting.Duncan Sands2008-05-091-2/+2
| | | | llvm-svn: 50900
* Implement PR2298. This transforms:Chris Lattner2008-05-091-0/+13
| | | | | | | ~x < ~y --> y < x -x == -y --> x == y llvm-svn: 50882
* restore doxygen comment.Chris Lattner2008-05-091-17/+16
| | | | llvm-svn: 50881
* Improve pass documentation and comments.Gordon Henriksen2008-05-085-26/+38
| | | | | | Patch by Matthijs Kooijman! llvm-svn: 50861
* More than just loads can read from memory: readonly calls like strlenChris Lattner2008-05-081-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 toChris Lattner2008-05-081-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 Patel2008-05-081-1/+1
| | | | llvm-svn: 50851
* Turn StripPointerCast() into a methodAnton Korobeynikov2008-05-071-1/+1
| | | | llvm-svn: 50836
* Fix a bug in the ComputeMaskedBits logic for multiply.Dan Gohman2008-05-071-2/+2
| | | | llvm-svn: 50793
* Make StripPointerCast a common function (should we mak it method of Value ↵Anton Korobeynikov2008-05-061-2/+1
| | | | | | instead?) llvm-svn: 50775
* We need to update PHIs containing the exiting block, not the exit block. We ↵Owen Anderson2008-05-061-3/+8
| | | | | | really should come up with better names for these. llvm-svn: 50770
* Fix typo.Devang Patel2008-05-061-1/+1
| | | | llvm-svn: 50713
* fix typo Duncan noticedChris Lattner2008-05-061-1/+1
| | | | llvm-svn: 50699
* Make several variable declarations static.Dan Gohman2008-05-068-10/+10
| | | | llvm-svn: 50696
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-2/+0
| | | | llvm-svn: 50695
* Correct the value of LowBits in srem and urem handling inDan Gohman2008-05-061-6/+6
| | | | | | ComputeMaskedBits. llvm-svn: 50692
* Fix: Some classes were derived from a class in an anonymous namespace, but theyBill Wendling2008-05-051-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 Lattner2008-05-051-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, avoidTorok Edwin2008-05-041-2/+1
| | | | | | using dyn_cast<> on already freed memory. llvm-svn: 50618
* Handle multiple return values.Devang Patel2008-05-031-1/+23
| | | | llvm-svn: 50604
* Do not sink getresult.Devang Patel2008-05-031-1/+3
| | | | llvm-svn: 50600
* Fix a mistake in the computation of leading zeros for udiv.Dan Gohman2008-05-021-3/+5
| | | | llvm-svn: 50591
* strength reduce exp2 into ldexp, rdar://5852514Chris Lattner2008-05-021-1/+52
| | | | llvm-svn: 50586
* add a FIXME so we remember to eventually remove this code.Chris Lattner2008-05-021-5/+6
| | | | llvm-svn: 50582
* Porting r50563 from Tak to mainline.Bill Wendling2008-05-021-0/+5
| | | | llvm-svn: 50564
* Don't try to create PHIs of struct types. FalloutDale Johannesen2008-05-011-8/+31
| | | | | | from x86-64 calling convention work. llvm-svn: 50545
* Fix an overaggressive SimplifyDemandedBits optimization on urem. ThisDan Gohman2008-05-011-4/+5
| | | | | | fixes the 254.gap regression on x86 and the 403.gcc regression on x86-64. llvm-svn: 50537
* 1) add '-debug' outputChris Lattner2008-05-011-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 asChris Lattner2008-05-012-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 Anderson2008-04-301-1/+1
| | | | llvm-svn: 50473
* move lowering of llvm.memset -> store from simplify libcalls Chris Lattner2008-04-301-7/+49
| | | | | | to instcombine. llvm-svn: 50472
* use string length computation to generalize several xforms.Chris Lattner2008-04-301-36/+39
| | | | llvm-svn: 50464
* Revert r50441. The original code was correct. Add some more comments so ↵Owen Anderson2008-04-291-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 Anderson2008-04-291-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 Anderson2008-04-291-1/+1
| | | | llvm-svn: 50442
* A lot of cleanups and documentation improvements, as well as a few corner ↵Owen Anderson2008-04-291-59/+76
| | | | | | | | case fixes. Most of this was suggested by Chris. llvm-svn: 50441
* Rename DeadLoopElimination to LoopDeletion, part 2.Owen Anderson2008-04-291-14/+12
| | | | llvm-svn: 50437
* Rename DeadLoopElimination to LoopDeletion, part one.Owen Anderson2008-04-291-0/+0
| | | | llvm-svn: 50436
* don't eliminate load from volatile value on paths where the load is dead.Chris Lattner2008-04-291-0/+9
| | | | | | This fixes the second half of PR2262 llvm-svn: 50430
* fix a subtle volatile handling bug.Chris Lattner2008-04-291-7/+12
| | | | llvm-svn: 50428
* Implement more aggressive support for analyzing string length. ThisChris Lattner2008-04-291-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 Anderson2008-04-291-0/+4
| | | | llvm-svn: 50406
* don't delete the last store to an alloca if the store is volatile.Chris Lattner2008-04-291-1/+1
| | | | llvm-svn: 50390
* Add some more comments.Owen Anderson2008-04-291-0/+21
| | | | llvm-svn: 50384
* Remove debugging code.Owen Anderson2008-04-291-4/+0
| | | | llvm-svn: 50383
OpenPOWER on IntegriCloud