summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Fix InstCombine/2007-10-31-RangeCrash.llChris Lattner2007-11-011-0/+8
| | | | llvm-svn: 43596
* Fix a typo in a comment.Dan Gohman2007-10-311-1/+1
| | | | llvm-svn: 43553
* At end of LSR, replace uses of now constant (as result of SplitCriticalEdge) ↵Evan Cheng2007-10-301-9/+33
| | | | | | PHI node with the constant value. llvm-svn: 43533
* It's not safe to tell SplitCriticalEdge to merge identical edges. It may ↵Evan Cheng2007-10-301-11/+9
| | | | | | delete the phi instruction that's being processed. llvm-svn: 43524
* - Bug fixes.Evan Cheng2007-10-291-10/+38
| | | | | | - Allow icmp rewrite using an iv / stride of a smaller integer type. llvm-svn: 43480
* Don't bitcast from pointer-to-vector to pointer-to-array whenDan Gohman2007-10-291-20/+4
| | | | | | lowering load and store instructions. llvm-svn: 43468
* Use an array instead of a fixed-length std::vector.Dan Gohman2007-10-291-6/+8
| | | | llvm-svn: 43467
* Do a real assert if there is an unhandled vector instruction insteadDan Gohman2007-10-291-3/+3
| | | | | | of just printing to cerr. llvm-svn: 43466
* Update a comment to reflect the current code.Dan Gohman2007-10-291-2/+2
| | | | llvm-svn: 43463
* Remove an unused function argument.Dan Gohman2007-10-291-6/+6
| | | | llvm-svn: 43462
* Fix a typo in a comment.Dan Gohman2007-10-291-1/+1
| | | | llvm-svn: 43461
* Avoid calling ValidStride when not all uses are addresses.Dan Gohman2007-10-291-6/+5
| | | | llvm-svn: 43460
* Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators Chris Lattner2007-10-291-4/+6
| | | | | | can have uses too. Wouldn't it be nice if invoke didn't exist? :) llvm-svn: 43426
* A number of LSR fixes:Evan Cheng2007-10-261-21/+32
| | | | | | | | | - ChangeCompareStride only reuse stride that is larger than current stride. It will let the general reuse mechanism to try to reuse a smaller stride. - Watch out for multiplication overflow in ChangeCompareStride. - Replace std::set with SmallPtrSet. llvm-svn: 43408
* Fix a crash. Make sure TLI is not null.Evan Cheng2007-10-261-1/+1
| | | | llvm-svn: 43384
* More fleshing out of docs/Passes.html, plus some typo fixes andGordon Henriksen2007-10-262-9/+9
| | | | | | improved wording in source files. llvm-svn: 43377
* Loosen up iv reuse to allow reuse of the same stride but a larger type when ↵Evan Cheng2007-10-261-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | truncating from the larger type to smaller type is free. e.g. Turns this loop: LBB1_1: # entry.bb_crit_edge xorl %ecx, %ecx xorw %dx, %dx movw %dx, %si LBB1_2: # bb movl L_X$non_lazy_ptr, %edi movw %si, (%edi) movl L_Y$non_lazy_ptr, %edi movw %dx, (%edi) addw $4, %dx incw %si incl %ecx cmpl %eax, %ecx jne LBB1_2 # bb into LBB1_1: # entry.bb_crit_edge xorl %ecx, %ecx xorw %dx, %dx LBB1_2: # bb movl L_X$non_lazy_ptr, %esi movw %cx, (%esi) movl L_Y$non_lazy_ptr, %esi movw %dx, (%esi) addw $4, %dx incl %ecx cmpl %eax, %ecx jne LBB1_2 # bb llvm-svn: 43375
* Do not rewrite compare instruction using iv of a different stride if the newEvan Cheng2007-10-251-36/+80
| | | | | | stride may be rewritten using the stride of the compare instruction. llvm-svn: 43367
* Remove code that's commented out.Evan Cheng2007-10-251-2/+0
| | | | llvm-svn: 43356
* If a loop termination compare instruction is the only use of its stride,Evan Cheng2007-10-251-34/+163
| | | | | | | | | | | | | | | | | | | and the compaison is against a constant value, try eliminate the stride by moving the compare instruction to another stride and change its constant operand accordingly. e.g. loop: ... v1 = v1 + 3 v2 = v2 + 1 if (v2 < 10) goto loop => loop: ... v1 = v1 + 3 if (v1 < 30) goto loop llvm-svn: 43336
* Fix off by 1 bug in printf->puts lowering.Dale Johannesen2007-10-241-1/+3
| | | | llvm-svn: 43309
* simplify some code by using the new isNaN predicateChris Lattner2007-10-241-4/+2
| | | | llvm-svn: 43305
* Implement a couple of foldings for ordered and unordered comparisons,Chris Lattner2007-10-241-4/+44
| | | | | | implementing cases related to PR1738. llvm-svn: 43289
* Strength reduction improvements.Dan Gohman2007-10-221-20/+61
| | | | | | | | | | | | | | | | | | | | | | - Avoid attempting stride-reuse in the case that there are users that aren't addresses. In that case, there will be places where the multiplications won't be folded away, so it's better to try to strength-reduce them. - Several SSE intrinsics have operands that strength-reduction can treat as addresses. The previous item makes this more visible, as any non-address use of an IV can inhibit stride-reuse. - Make ValidStride aware of whether there's likely to be a base register in the address computation. This prevents it from thinking that things like stride 9 are valid on x86 when the base register is already occupied. Also, XFAIL the 2007-08-10-LEA16Use32.ll test; the new logic to avoid stride-reuse elimintes the LEA in the loop, so the test is no longer testing what it was intended to test. llvm-svn: 43231
* Move the SCEV object factors from being static members of the individualDan Gohman2007-10-222-77/+83
| | | | | | | SCEV subclasses to being non-static member functions of the ScalarEvolution class. llvm-svn: 43224
* Reg2Mem cleanup and optimizations:Anton Korobeynikov2007-10-212-25/+72
| | | | | | | - enable phi instructions demotion to stack - create alloca instructions in the entry block llvm-svn: 43208
* Try again.Devang Patel2007-10-181-3/+36
| | | | | | | Instead of loading small global string from memory, use integer constant. llvm-svn: 43148
* Allow GVN to eliminate redundant calls to functions without side effects.Owen Anderson2007-10-181-5/+65
| | | | llvm-svn: 43147
* Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll byChris Lattner2007-10-181-3/+3
| | | | | | fixing some obviously broken code :( llvm-svn: 43141
* Move Split<...>() into DomTreeBase. This should make the #include's of ↵Owen Anderson2007-10-182-2/+0
| | | | | | | | | | DominatorInternals.h in CodeExtractor and LoopSimplify unnecessary. Hartmut, could you confirm that this fixes the issues you were seeing? llvm-svn: 43115
* Reverting r43070 for now. It's causing llc test failures.Evan Cheng2007-10-171-25/+0
| | | | llvm-svn: 43103
* Do not raise free() call that is called through invoke instruction.Devang Patel2007-10-171-0/+2
| | | | llvm-svn: 43083
* Fixed linker errors (unresolved externals: split<>(...)) when compiling with ↵Hartmut Kaiser2007-10-172-0/+2
| | | | | | VC++. Please review. llvm-svn: 43081
* Apply "Instead of loading small c string constant, use integer constant ↵Devang Patel2007-10-171-25/+28
| | | | | | directly" transformation while processing load instruction. llvm-svn: 43070
* Use immediate stores.Devang Patel2007-10-161-3/+25
| | | | llvm-svn: 43055
* Achieve same result but use fewer lines of code.Devang Patel2007-10-151-8/+7
| | | | llvm-svn: 42985
* Dest type is always i8 *. This allows some simplification.Devang Patel2007-10-121-33/+12
| | | | | | Do not filter memmove. llvm-svn: 42930
* Fix a bug in my patch last night that broke InstCombine/2007-10-12-Crash.llChris Lattner2007-10-121-1/+7
| | | | llvm-svn: 42920
* eliminate warningGabor Greif2007-10-121-1/+1
| | | | llvm-svn: 42892
* Fix some 80 column violations.Chris Lattner2007-10-121-35/+42
| | | | | | | | Fix DecomposeSimpleLinearExpr to handle simple constants better. Don't nuke gep(bitcast(allocation)) if the bitcast(allocation) will fold the allocation. This fixes PR1728 and Instcombine/malloc3.ll llvm-svn: 42891
* Lower memcpy if it makes sense.Devang Patel2007-10-111-0/+46
| | | | llvm-svn: 42864
* Do not walk invalid iterator.Devang Patel2007-10-091-2/+2
| | | | llvm-svn: 42812
* Fix bug in updating dominance frontier after loop Devang Patel2007-10-051-27/+117
| | | | | | | unswitch when frontier includes basic blocks that are not inside loop. llvm-svn: 42654
* Fix 80 col violation.Devang Patel2007-10-031-3/+3
| | | | llvm-svn: 42591
* Refactor code in a separate method.Devang Patel2007-10-031-33/+46
| | | | llvm-svn: 42590
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-034-6/+6
| | | | | | of comparing begin() and end(). llvm-svn: 42585
* Tone down an overzealous optimization.Dale Johannesen2007-10-031-3/+21
| | | | llvm-svn: 42582
* Fix PR1719, by not marking llvm.global.annotations internal.Tanya Lattner2007-10-031-0/+1
| | | | llvm-svn: 42578
* Fix PR1719, by not marking llvm.noinline internal.Chris Lattner2007-10-031-0/+1
| | | | llvm-svn: 42565
* Fix stride computations for long double arrays.Dale Johannesen2007-10-011-1/+1
| | | | llvm-svn: 42508
OpenPOWER on IntegriCloud