- Aug 05, 2005
-
-
Chris Lattner authored
This fixes LSR crashes on 301.apsi, 191.fma3d, and 189.lucas llvm-svn: 22673
-
Chris Lattner authored
the PHI node, this ugly code can vanish. llvm-svn: 22672
-
Chris Lattner authored
llvm-svn: 22667
-
Nate Begeman authored
BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp llvm-svn: 22664
-
Chris Lattner authored
that the symbolic evaluator is not always able to use subtraction to remove expressions. This makes the code faster, and fixes the last crash on 178.galgel. Finally, add a statistic to see how many phi nodes are inserted. On 178.galgel, we get the follow stats: 2562 loop-reduce - Number of PHIs inserted 3927 loop-reduce - Number of GEPs strength reduced llvm-svn: 22662
-
- Aug 04, 2005
-
-
Chris Lattner authored
method. * Fix a crash on 178.galgel, where we would insert expressions before PHI nodes instead of into the PHI node predecessor blocks. llvm-svn: 22657
-
Chris Lattner authored
llvm-svn: 22653
-
Chris Lattner authored
for (i = 0; i < N; ++i) A[i][foo()] = 0; here we still want to strength reduce the A[i] part, even though foo() is l-v. This also simplifies some of the 'CanReduce' logic. This implements Transforms/LoopStrengthReduce/ops_after_indvar.ll llvm-svn: 22652
-
Nate Begeman authored
llvm-svn: 22650
-
Chris Lattner authored
1. We only analyze instructions once, guaranteed 2. AnalyzeGetElementPtrUsers has been ripped apart and replaced with something much simpler. The next step is to handle expressions that are not all indvar+loop-invariant values (e.g. handling indvar+loopvariant). llvm-svn: 22649
-
Chris Lattner authored
llvm-svn: 22643
-
Chris Lattner authored
llvm-svn: 22641
-
Chris Lattner authored
sure to handle the use, just don't recurse into it. This permits us to generate this code for a simple nested loop case: .LBB_foo_0: ; entry stwu r1, -48(r1) stw r29, 44(r1) stw r30, 40(r1) mflr r11 stw r11, 56(r1) lis r2, ha16(L_A$non_lazy_ptr) lwz r30, lo16(L_A$non_lazy_ptr)(r2) li r29, 1 .LBB_foo_1: ; no_exit.0 bl L_bar$stub li r2, 1 or r3, r30, r30 .LBB_foo_2: ; no_exit.1 lfd f0, 8(r3) stfd f0, 0(r3) addi r4, r2, 1 addi r3, r3, 8 cmpwi cr0, r2, 100 or r2, r4, r4 bne .LBB_foo_2 ; no_exit.1 .LBB_foo_3: ; loopexit.1 addi r30, r30, 800 addi r2, r29, 1 cmpwi cr0, r29, 100 or r29, r2, r2 bne .LBB_foo_1 ; no_exit.0 .LBB_foo_4: ; return lwz r11, 56(r1) mtlr r11 lwz r30, 40(r1) lwz r29, 44(r1) lwz r1, 0(r1) blr instead of this: _foo: .LBB_foo_0: ; entry stwu r1, -48(r1) stw r28, 44(r1) ;; uses an extra register. stw r29, 40(r1) stw r30, 36(r1) mflr r11 stw r11, 56(r1) li r30, 1 li r29, 0 or r28, r29, r29 .LBB_foo_1: ; no_exit.0 bl L_bar$stub mulli r2, r28, 800 ;; unstrength-reduced multiply lis r3, ha16(L_A$non_lazy_ptr) ;; loop invariant address computation lwz r3, lo16(L_A$non_lazy_ptr)(r3) add r2, r2, r3 mulli r4, r29, 800 ;; unstrength-reduced multiply addi r3, r3, 8 add r3, r4, r3 li r4, 1 .LBB_foo_2: ; no_exit.1 lfd f0, 0(r3) stfd f0, 0(r2) addi r5, r4, 1 addi r2, r2, 8 ;; multiple stride 8 IV's addi r3, r3, 8 cmpwi cr0, r4, 100 or r4, r5, r5 bne .LBB_foo_2 ; no_exit.1 .LBB_foo_3: ; loopexit.1 addi r28, r28, 1 ;;; Many IV's with stride 1 addi r29, r29, 1 addi r2, r30, 1 cmpwi cr0, r30, 100 or r30, r2, r2 bne .LBB_foo_1 ; no_exit.0 .LBB_foo_4: ; return lwz r11, 56(r1) mtlr r11 lwz r30, 36(r1) lwz r29, 40(r1) lwz r28, 44(r1) lwz r1, 0(r1) blr llvm-svn: 22640
-
Chris Lattner authored
pushed down by SCEV. In a nested loop case, this allows us to emit this: lis r3, ha16(L_A$non_lazy_ptr) lwz r3, lo16(L_A$non_lazy_ptr)(r3) add r2, r2, r3 li r3, 1 .LBB_foo_2: ; no_exit.1 lfd f0, 8(r2) ;; Uses offset of 8 instead of 0 stfd f0, 0(r2) addi r4, r3, 1 addi r2, r2, 8 cmpwi cr0, r3, 100 or r3, r4, r4 bne .LBB_foo_2 ; no_exit.1 instead of this: lis r3, ha16(L_A$non_lazy_ptr) lwz r3, lo16(L_A$non_lazy_ptr)(r3) add r2, r2, r3 addi r3, r3, 8 li r4, 1 .LBB_foo_2: ; no_exit.1 lfd f0, 0(r3) stfd f0, 0(r2) addi r5, r4, 1 addi r2, r2, 8 addi r3, r3, 8 cmpwi cr0, r4, 100 or r4, r5, r5 bne .LBB_foo_2 ; no_exit.1 llvm-svn: 22639
-
Chris Lattner authored
llvm-svn: 22638
-
Chris Lattner authored
Only emit one PHI node for IV uses with identical bases and strides (after moving foldable immediates to the load/store instruction). This implements LoopStrengthReduce/dont_insert_redundant_ops.ll, allowing us to generate this PPC code for test1: or r30, r3, r3 .LBB_test1_1: ; Loop li r2, 0 stw r2, 0(r30) stw r2, 4(r30) bl L_pred$stub addi r30, r30, 8 cmplwi cr0, r3, 0 bne .LBB_test1_1 ; Loop instead of this code: or r30, r3, r3 or r29, r3, r3 .LBB_test1_1: ; Loop li r2, 0 stw r2, 0(r29) stw r2, 4(r30) bl L_pred$stub addi r30, r30, 8 ;; Two iv's with step of 8 addi r29, r29, 8 cmplwi cr0, r3, 0 bne .LBB_test1_1 ; Loop llvm-svn: 22635
-
Chris Lattner authored
unify some parallel vectors and get field names more descriptive than "first" and "second". This isn't lisp afterall :) llvm-svn: 22633
-
- Aug 03, 2005
-
-
Chris Lattner authored
map from instruction* to SCEVHandles. When we delete instructions, we have to tell it about it. We would run into nasty cases where new instructions were reallocated at old instruction addresses and get the old map values. Bad bad bad :( llvm-svn: 22632
-
Chris Lattner authored
Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll llvm-svn: 22628
-
Chris Lattner authored
fixes PR612 and Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll llvm-svn: 22626
-
- Aug 02, 2005
-
-
Chris Lattner authored
Patch contributed by Jim Laskey! llvm-svn: 22592
-
Chris Lattner authored
llvm-svn: 22586
-
Chris Lattner authored
llvm-svn: 22581
-
Chris Lattner authored
llvm-svn: 22580
-
Chris Lattner authored
Make LSR ignore GEP's that have loop variant base values, as we currently cannot codegen them llvm-svn: 22576
-
Chris Lattner authored
llvm-svn: 22575
-
- Jul 30, 2005
-
-
Jeff Cohen authored
llvm-svn: 22565
-
Jeff Cohen authored
llvm-svn: 22564
-
Nate Begeman authored
llvm-svn: 22560
-
Nate Begeman authored
target data to decide which loop induction variables to strength reduce and how to do so. This work is mostly by Chris Lattner, with tweaks by me to get it working on some of MultiSource. llvm-svn: 22558
-
Nate Begeman authored
other passes may use it. llvm-svn: 22557
-
- Jul 27, 2005
-
-
Jeff Cohen authored
llvm-svn: 22523
-
- Jul 20, 2005
-
-
Chris Lattner authored
explained in the comment. This fixes UnitTests/2003-09-18-BitFieldTest on darwin llvm-svn: 22483
-
- Jul 19, 2005
-
-
Chris Lattner authored
as a signed compare. This patch may fix PR597, but is correct in any case. llvm-svn: 22465
-
- Jul 07, 2005
-
-
Chris Lattner authored
Because the instcombine has to scan the entire function when it starts up to begin with, we might as well do it in DFO so we can nuke unreachable code. This fixes: Transforms/InstCombine/2005-07-07-DeadPHILoop.ll llvm-svn: 22348
-
- Jun 20, 2005
-
-
Andrew Lenharth authored
llvm-svn: 22265
-
- Jun 18, 2005
-
-
Andrew Lenharth authored
llvm-svn: 22254
-
Reid Spencer authored
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build. llvm-svn: 22249
-
- Jun 17, 2005
-
-
Chris Lattner authored
It is actually always true. This fixes PR586 and Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll llvm-svn: 22236
-
Chris Lattner authored
Transforms/InstCombine/2005-06-16-RangeCrash.ll llvm-svn: 22234
-