| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Minor cleanup patch, no functionality changes. Written by Jim Laskey. | Chris Lattner | 2005-08-09 | 1 | -19/+19 |
| | | | | | llvm-svn: 22727 | ||||
| * | Fix CodeGen/Generic/div-neg-power-2.ll, a regression from last night. | Chris Lattner | 2005-08-09 | 1 | -0/+2 |
| | | | | | llvm-svn: 22726 | ||||
| * | SCEVAddExpr::get() of an empty list is invalid. | Chris Lattner | 2005-08-09 | 1 | -1/+4 |
| | | | | | llvm-svn: 22724 | ||||
| * | Implement: LoopStrengthReduce/share_ivs.ll | Chris Lattner | 2005-08-09 | 1 | -53/+153 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes: * Only insert one PHI node for each stride. Other values are live in values. This cannot introduce higher register pressure than the previous approach, and can take advantage of reg+reg addressing modes. * Factor common base values out of uses before moving values from the base to the immediate fields. This improves codegen by starting the stride-specific PHI node out at a common place for each IV use. As an example, we used to generate this for a loop in swim: .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_2: ; no_exit.7.i lfd f0, 0(r8) stfd f0, 0(r3) lfd f0, 0(r6) stfd f0, 0(r7) lfd f0, 0(r2) stfd f0, 0(r5) addi r9, r9, 1 addi r2, r2, 8 addi r5, r5, 8 addi r6, r6, 8 addi r7, r7, 8 addi r8, r8, 8 addi r3, r3, 8 cmpw cr0, r9, r4 bgt .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_1 now we emit: .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_2: ; no_exit.7.i lfdx f0, r8, r2 stfdx f0, r9, r2 lfdx f0, r5, r2 stfdx f0, r7, r2 lfdx f0, r3, r2 stfdx f0, r6, r2 addi r10, r10, 1 addi r2, r2, 8 cmpw cr0, r10, r4 bgt .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_1 As another more dramatic example, we used to emit this: .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_2: ; no_exit.1.i19 lfd f0, 8(r21) lfd f4, 8(r3) lfd f5, 8(r27) lfd f6, 8(r22) lfd f7, 8(r5) lfd f8, 8(r6) lfd f9, 8(r30) lfd f10, 8(r11) lfd f11, 8(r12) fsub f10, f10, f11 fadd f5, f4, f5 fmul f5, f5, f1 fadd f6, f6, f7 fadd f6, f6, f8 fadd f6, f6, f9 fmadd f0, f5, f6, f0 fnmsub f0, f10, f2, f0 stfd f0, 8(r4) lfd f0, 8(r25) lfd f5, 8(r26) lfd f6, 8(r23) lfd f9, 8(r28) lfd f10, 8(r10) lfd f12, 8(r9) lfd f13, 8(r29) fsub f11, f13, f11 fadd f4, f4, f5 fmul f4, f4, f1 fadd f5, f6, f9 fadd f5, f5, f10 fadd f5, f5, f12 fnmsub f0, f4, f5, f0 fnmsub f0, f11, f3, f0 stfd f0, 8(r24) lfd f0, 8(r8) fsub f4, f7, f8 fsub f5, f12, f10 fnmsub f0, f5, f2, f0 fnmsub f0, f4, f3, f0 stfd f0, 8(r2) addi r20, r20, 1 addi r2, r2, 8 addi r8, r8, 8 addi r10, r10, 8 addi r12, r12, 8 addi r6, r6, 8 addi r29, r29, 8 addi r28, r28, 8 addi r26, r26, 8 addi r25, r25, 8 addi r24, r24, 8 addi r5, r5, 8 addi r23, r23, 8 addi r22, r22, 8 addi r3, r3, 8 addi r9, r9, 8 addi r11, r11, 8 addi r30, r30, 8 addi r27, r27, 8 addi r21, r21, 8 addi r4, r4, 8 cmpw cr0, r20, r7 bgt .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_1 we now emit: .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_2: ; no_exit.1.i19 lfdx f0, r21, r20 lfdx f4, r3, r20 lfdx f5, r27, r20 lfdx f6, r22, r20 lfdx f7, r5, r20 lfdx f8, r6, r20 lfdx f9, r30, r20 lfdx f10, r11, r20 lfdx f11, r12, r20 fsub f10, f10, f11 fadd f5, f4, f5 fmul f5, f5, f1 fadd f6, f6, f7 fadd f6, f6, f8 fadd f6, f6, f9 fmadd f0, f5, f6, f0 fnmsub f0, f10, f2, f0 stfdx f0, r4, r20 lfdx f0, r25, r20 lfdx f5, r26, r20 lfdx f6, r23, r20 lfdx f9, r28, r20 lfdx f10, r10, r20 lfdx f12, r9, r20 lfdx f13, r29, r20 fsub f11, f13, f11 fadd f4, f4, f5 fmul f4, f4, f1 fadd f5, f6, f9 fadd f5, f5, f10 fadd f5, f5, f12 fnmsub f0, f4, f5, f0 fnmsub f0, f11, f3, f0 stfdx f0, r24, r20 lfdx f0, r8, r20 fsub f4, f7, f8 fsub f5, f12, f10 fnmsub f0, f5, f2, f0 fnmsub f0, f4, f3, f0 stfdx f0, r2, r20 addi r19, r19, 1 addi r20, r20, 8 cmpw cr0, r19, r7 bgt .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_1 llvm-svn: 22722 | ||||
| * | Suck the base value out of the UsersToProcess vector into the BasedUser | Chris Lattner | 2005-08-08 | 1 | -38/+38 |
| | | | | | | | class to simplify the code. Fuse two loops. llvm-svn: 22721 | ||||
| * | Split MoveLoopVariantsToImediateField out from MoveImmediateValues. The | Chris Lattner | 2005-08-08 | 1 | -23/+65 |
| | | | | | | | | first is a correctness thing, and the later is an optzn thing. This also is needed to support a future change. llvm-svn: 22720 | ||||
| * | Factor out some common code, and be smarter about when to emit load hi/lo | Nate Begeman | 2005-08-08 | 1 | -31/+27 |
| | | | | | | | code sequences. llvm-svn: 22719 | ||||
| * | Allow tools with "consume after" options (like lli) to take more positional | Chris Lattner | 2005-08-08 | 1 | -4/+1 |
| | | | | | | | | opts than they take directly. Thanks to John C for pointing this problem out to me! llvm-svn: 22717 | ||||
| * | Remove getImmediateForOpcode, which is now dead. | Chris Lattner | 2005-08-08 | 1 | -59/+0 |
| | | | | | | | Patch by Jim Laskey. llvm-svn: 22716 | ||||
| * | Add new immediate handling support for mul/div. | Chris Lattner | 2005-08-08 | 1 | -21/+30 |
| | | | | | | | Patch by Jim Laskey! llvm-svn: 22715 | ||||
| * | Add support for OR/XOR/SUB immediates that are handled with the new immediate | Chris Lattner | 2005-08-08 | 1 | -37/+55 |
| | | | | | | | way. This allows ORI/ORIS pairs, for example. llvm-svn: 22714 | ||||
| * | Modify the ISD::AND opcode case to use new immediate constant predicates. | Chris Lattner | 2005-08-08 | 1 | -45/+36 |
| | | | | | | | | | | | Includes wider support for rotate and mask cases. Patch by Jim Laskey. I've requested that Jim add new regression tests the newly handled cases. llvm-svn: 22712 | ||||
| * | Modify the ISD::ADD opcode case to use new immediate constant predicates. | Chris Lattner | 2005-08-08 | 1 | -11/+15 |
| | | | | | | | | | Includes support for 32-bit constants using addi/addis. Patch by Jim Laskey. llvm-svn: 22711 | ||||
| * | Modify existing support functions to use new immediate constant predicates. | Chris Lattner | 2005-08-08 | 1 | -10/+9 |
| | | | | | | | Patch by Jim Laskey llvm-svn: 22710 | ||||
| * | Add support predicates for future immediate constant changes. | Chris Lattner | 2005-08-08 | 1 | -0/+71 |
| | | | | | | | Patch by Jim Laskey llvm-svn: 22709 | ||||
| * | Move IsRunOfOnes to a more logical place and rename to a proper predicate form | Chris Lattner | 2005-08-08 | 1 | -24/+24 |
| | | | | | | | | | (lowercase isXXX). Patch by Jim Laskey. llvm-svn: 22708 | ||||
| * | Fix JIT encoding of ppc mfocrf instruction; the operands were reversed | Nate Begeman | 2005-08-08 | 2 | -6/+20 |
| | | | | | llvm-svn: 22707 | ||||
| * | Use the new 'moveBefore' method to simplify some code. Really, which is | Chris Lattner | 2005-08-08 | 3 | -6/+4 |
| | | | | | | | easier to understand? :) llvm-svn: 22706 | ||||
| * | Reject command lines that have too many positional arguments passed (e.g., | Chris Lattner | 2005-08-08 | 1 | -1/+15 |
| | | | | | | | | | 'opt x y'). This fixes PR493. Patch contributed by Owen Anderson! llvm-svn: 22705 | ||||
| * | Not all constants are legal immediates in load/store instructions. | Chris Lattner | 2005-08-08 | 1 | -1/+7 |
| | | | | | llvm-svn: 22704 | ||||
| * | Implement LoopStrengthReduce/share_code_in_preheader.ll by having one | Chris Lattner | 2005-08-08 | 1 | -1/+4 |
| | | | | | | | rewriter for all code inserted into the preheader, which is never flushed. llvm-svn: 22702 | ||||
| * | Implement a simple optimization for the termination condition of the loop. | Chris Lattner | 2005-08-08 | 1 | -6/+107 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The termination condition actually wants to use the post-incremented value of the loop, not a new indvar with an unusual base. On PPC, for example, this allows us to compile LoopStrengthReduce/exit_compare_live_range.ll to: _foo: li r2, 0 .LBB_foo_1: ; no_exit li r5, 0 stw r5, 0(r3) addi r2, r2, 1 cmpw cr0, r2, r4 bne .LBB_foo_1 ; no_exit blr instead of: _foo: li r2, 1 ;; IV starts at 1, not 0 .LBB_foo_1: ; no_exit li r5, 0 stw r5, 0(r3) addi r5, r2, 1 cmpw cr0, r2, r4 or r2, r5, r5 ;; Reg-reg copy, extra live range bne .LBB_foo_1 ; no_exit blr This implements LoopStrengthReduce/exit_compare_live_range.ll llvm-svn: 22699 | ||||
| * | add new helper function | Chris Lattner | 2005-08-08 | 1 | -0/+9 |
| | | | | | llvm-svn: 22698 | ||||
| * | Handle 64-bit constant exprs on 64-bit targets. | Chris Lattner | 2005-08-08 | 1 | -1/+3 |
| | | | | | llvm-svn: 22696 | ||||
| * | All stats are "Number of ..." | Chris Lattner | 2005-08-07 | 1 | -1/+1 |
| | | | | | llvm-svn: 22694 | ||||
| * | Add some simple folds that occur in bitfield cases. Fix a minor bug in | Chris Lattner | 2005-08-07 | 1 | -0/+32 |
| | | | | | | | isHighOnes, where it would consider 0 to have high ones. llvm-svn: 22693 | ||||
| * | Fix typoCVS: ↵ | Chris Lattner | 2005-08-07 | 1 | -1/+1 |
| | | | | | | | ---------------------------------------------------------------------- llvm-svn: 22692 | ||||
| * | add a small simplification that can be exposed after promotion/expansion | Chris Lattner | 2005-08-07 | 1 | -2/+7 |
| | | | | | llvm-svn: 22691 | ||||
| * | * Use the new PHINode::hasConstantValue method to simplify some code | Chris Lattner | 2005-08-07 | 1 | -26/+66 |
| | | | | | | | | | | | | * Teach this code to move allocas out of the loop when tail call eliminating a call marked 'tail'. This implements TailCallElim/move_alloca_for_tail_call.ll * Do not perform this transformation if a call is marked 'tail' and if there are allocas that we cannot move out of the loop in #2. Doing so would increase the stack usage of the function. This implements fixes PR615 and TailCallElim/dont-tce-tail-marked-call.ll. llvm-svn: 22690 | ||||
| * | Consolidate the GPOpt stuff to all use the Subtarget, instead of still | Chris Lattner | 2005-08-05 | 6 | -42/+48 |
| | | | | | | | | | depending on the command line option. Now the command line option just sets the subtarget as appropriate. G5 opts will now default to on on G5-enabled nightly testers among other machines. llvm-svn: 22688 | ||||
| * | adjust to change in getSubtarget() api | Chris Lattner | 2005-08-05 | 1 | -1/+1 |
| | | | | | llvm-svn: 22687 | ||||
| * | Enable gp optimizations by default when available, even when a target triple | Chris Lattner | 2005-08-05 | 1 | -0/+3 |
| | | | | | | | | is available, since the target triple doesn't specify whether to use gpopts or not. llvm-svn: 22685 | ||||
| * | add a note | Chris Lattner | 2005-08-05 | 1 | -0/+3 |
| | | | | | llvm-svn: 22681 | ||||
| * | Change FindEarliestCallSeqEnd (used by libcall insertion) to use a set to | Chris Lattner | 2005-08-05 | 1 | -5/+9 |
| | | | | | | | | | | avoid revisiting nodes more than once. This eliminates a source of potentially exponential behavior. For a small function in 191.fma3d (hexah_stress_divergence_), this speeds up isel from taking > 20mins to taking 0.07s. llvm-svn: 22680 | ||||
| * | Fix a use-of-dangling-pointer bug, from the introduction of SrcValue's. | Chris Lattner | 2005-08-05 | 1 | -0/+5 |
| | | | | | llvm-svn: 22679 | ||||
| * | Fix a latent bug in the libcall inserter that was exposed by Nate's patch | Chris Lattner | 2005-08-05 | 1 | -6/+3 |
| | | | | | | | yesterday. This fixes whetstone and a bunch of programs in the External tests. llvm-svn: 22678 | ||||
| * | don't crash when running the PPC backend on non-ppc hosts without specifying | Chris Lattner | 2005-08-05 | 1 | -3/+1 |
| | | | | | | | a subtarget. llvm-svn: 22677 | ||||
| * | PHINode::hasConstantValue should never return the PHI itself, even if the | Chris Lattner | 2005-08-05 | 1 | -2/+5 |
| | | | | | | | PHI is its only operand. llvm-svn: 22676 | ||||
| * | Fix an iterator invalidation problem when we decide a phi has a constant value | Chris Lattner | 2005-08-05 | 1 | -1/+2 |
| | | | | | llvm-svn: 22675 | ||||
| * | Make sure to clean CastedPointers after casts are potentially deleted. | Chris Lattner | 2005-08-05 | 1 | -1/+1 |
| | | | | | | | This fixes LSR crashes on 301.apsi, 191.fma3d, and 189.lucas llvm-svn: 22673 | ||||
| * | now that hasConstantValue defaults to only returning values that dominate | Chris Lattner | 2005-08-05 | 1 | -19/+2 |
| | | | | | | | the PHI node, this ugly code can vanish. llvm-svn: 22672 | ||||
| * | Invoke instructions do not dominate all successors | Chris Lattner | 2005-08-05 | 1 | -1/+2 |
| | | | | | llvm-svn: 22671 | ||||
| * | Now that hasConstantValue is more careful w.r.t. returning values that only | Chris Lattner | 2005-08-05 | 1 | -5/+4 |
| | | | | | | | | dominate the PHI node, this code can go away. This also makes passes more aggressive, e.g. implementing Transforms/CondProp/phisimplify2.ll llvm-svn: 22670 | ||||
| * | Use the bool argument to hasConstantValue to decide whether the client is | Chris Lattner | 2005-08-05 | 1 | -2/+14 |
| | | | | | | | | | prepared to deal with return values that do not dominate the PHI. If we cannot prove that the result dominates the PHI node, do not return it if the client can't cope. llvm-svn: 22669 | ||||
| * | This code can handle non-dominating instructions | Chris Lattner | 2005-08-05 | 2 | -2/+2 |
| | | | | | llvm-svn: 22667 | ||||
| * | Mark hasConstantValue as a const method | Chris Lattner | 2005-08-05 | 1 | -1/+1 |
| | | | | | llvm-svn: 22666 | ||||
| * | Add an extra parameter that Chris requested | Nate Begeman | 2005-08-04 | 1 | -1/+1 |
| | | | | | llvm-svn: 22665 | ||||
| * | Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into | Nate Begeman | 2005-08-04 | 7 | -52/+43 |
| | | | | | | | | | 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 | ||||
| * | Modify how immediates are removed from base expressions to deal with the fact | Chris Lattner | 2005-08-04 | 1 | -26/+41 |
| | | | | | | | | | | | | | | 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 | ||||
| * | Fix a fixme in LegalizeDAG | Nate Begeman | 2005-08-04 | 1 | -7/+2 |
| | | | | | llvm-svn: 22661 | ||||

