summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Strip changes to llvm.dbg intrinsics.Jim Laskey2006-03-231-7/+34
| | | | llvm-svn: 26993
* Can't combine anymore - we don't have a chain through llvm.dbg intrinsics.Jim Laskey2006-03-231-10/+0
| | | | llvm-svn: 26992
* silence a bogus gcc warningChris Lattner2006-03-221-2/+2
| | | | llvm-svn: 26953
* Teach cee to propagate through switch statements. This implementsChris Lattner2006-03-191-1/+21
| | | | | | | | Transforms/CorrelatedExprs/switch.ll Patch contributed by Eric Kidd! llvm-svn: 26872
* - Fixed a bogus if condition.Evan Cheng2006-03-181-19/+25
| | | | | | | - Added more debugging info. - Allow reuse of IV of negative stride. e.g. -4 stride == 2 * iv of -2 stride. llvm-svn: 26841
* Sort StrideOrder so we can process the smallest strides first. This allowsEvan Cheng2006-03-181-0/+27
| | | | | | for more IV reuses. llvm-svn: 26837
* Allow users of iv / stride to be rewritten with expression that is a multiplyEvan Cheng2006-03-171-41/+83
| | | | | | of a smaller stride even if they have a common loop invariant expression part. llvm-svn: 26828
* For each loop, keep track of all the IV expressions inserted indexed byEvan Cheng2006-03-161-36/+115
| | | | | | | | | | | | | | stride. For a set of uses of the IV of a stride which is a multiple of another stride, do not insert a new IV expression. Rather, reuse the previous IV and rewrite the uses as uses of IV expression multiplied by the factor. e.g. x = 0 ...; x ++ y = 0 ...; y += 4 then use of y can be rewritten as use of 4*x for x86. llvm-svn: 26803
* Teach the strip pass to strip type names in addition to value names. ThisChris Lattner2006-03-151-0/+5
| | | | | | is fallout from the type/value split in the symtab long long ago :) llvm-svn: 26785
* Implement a FIXME, recusively reassociatingChris Lattner2006-03-141-26/+65
| | | | | | | | A*A*B + A*A*C --> A*(A*B+A*C) --> A*(A*(B+C)) This implements Reassociate/mul-factor3.ll llvm-svn: 26757
* extract some code into a method, no functionality changeChris Lattner2006-03-141-50/+56
| | | | llvm-svn: 26755
* Promote shifts by a constant to multiplies so that we can reassociateChris Lattner2006-03-141-13/+17
| | | | | | | (x<<1)+(y<<1) -> (X+Y)<<1. This implements Transforms/Reassociate/shift-factor.ll llvm-svn: 26753
* Added target lowering hooks which LSR consults to make more intelligentEvan Cheng2006-03-131-25/+33
| | | | | | transformation decisions. llvm-svn: 26738
* Handle the removal of the debug chain.Jim Laskey2006-03-131-1/+1
| | | | llvm-svn: 26729
* use autogenerated side-effect informationChris Lattner2006-03-091-27/+5
| | | | llvm-svn: 26673
* fix a pastoChris Lattner2006-03-091-1/+1
| | | | llvm-svn: 26627
* Fix a miscompilation of 188.ammp with the new CFE. 188.ammp is accessingChris Lattner2006-03-081-3/+19
| | | | | | | arrays out of range in a horrible way, but we shouldn't break it anyway. Details in the comments. llvm-svn: 26606
* Switch to using a numeric id for anchors.Jim Laskey2006-03-071-3/+4
| | | | llvm-svn: 26598
* Fix ConstantMerge/2006-03-07-DontMergeDiffSections.ll, a problem JimChris Lattner2006-03-071-11/+14
| | | | | | | hypotheticalized about, where we would incorrectly merge two globals in different sections. llvm-svn: 26597
* Teach the alignment handling code to look through constant expr casts and GEPsChris Lattner2006-03-071-4/+12
| | | | llvm-svn: 26580
* Teach instcombine to increase the alignment of memset/memcpy/memmove whenChris Lattner2006-03-061-3/+74
| | | | | | | | | | | | the pointer is known to come from either a global variable, alloca or malloc. This allows us to compile this: P = malloc(28); memset(P, 0, 28); into explicit stores on PPC instead of a memset call. llvm-svn: 26577
* Make vector narrowing more effective, implementingChris Lattner2006-03-051-22/+62
| | | | | | | Transforms/InstCombine/vec_narrow.ll. This add support for narrowing extract_element(insertelement) also. llvm-svn: 26538
* Add factoring of multiplications, e.g. turning A*A+A*B into A*(A+B).Chris Lattner2006-03-041-49/+186
| | | | | | Testcase here: Transforms/Reassociate/mulfactor.ll llvm-svn: 26524
* Canonicalize (X+C1)*C2 -> X*C2+C1*C2Chris Lattner2006-03-041-0/+13
| | | | | | This implements Transforms/InstCombine/add.ll:test31 llvm-svn: 26519
* Change this to work with renamed intrinsics.Chris Lattner2006-03-031-1/+7
| | | | llvm-svn: 26484
* Make this work with renamed intrinsics.Chris Lattner2006-03-031-26/+25
| | | | llvm-svn: 26482
* Generalize the REM folding code to handle another case Nick LewyckyChris Lattner2006-03-021-13/+43
| | | | | | pointed out: realize the AND can provide factors and look through Casts. llvm-svn: 26469
* Fix a regression in a patch from a couple of days ago. This fixesChris Lattner2006-02-281-1/+3
| | | | | | Transforms/InstCombine/2006-02-28-Crash.ll llvm-svn: 26427
* Implement rem.ll:test[7-9] and PR712Chris Lattner2006-02-281-6/+22
| | | | llvm-svn: 26415
* Simplify some code now that the RHS of a rem can't be 0Chris Lattner2006-02-281-8/+6
| | | | llvm-svn: 26413
* Rearrange some code, fold "rem X, 0", implementing rem.ll:test6Chris Lattner2006-02-281-38/+39
| | | | llvm-svn: 26411
* Merge two almost-identical pieces of code.Chris Lattner2006-02-271-46/+42
| | | | | | | | | | | | | | | Make this code more powerful by using ComputeMaskedBits instead of looking for an AND operand. This lets us fold this: int %test23(int %a) { %tmp.1 = and int %a, 1 %tmp.2 = seteq int %tmp.1, 0 %tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1 ret int %tmp.3 } into: xor (and a, 1), 1 llvm-svn: 26396
* Fold (A^B) == A -> B == 0Chris Lattner2006-02-271-0/+26
| | | | | | and (A-B) == A -> B == 0 llvm-svn: 26394
* Fold (X|C1)^C2 -> X^(C1|C2) when possible. This implementsChris Lattner2006-02-261-0/+14
| | | | | | InstCombine/or.ll:test23. llvm-svn: 26385
* Fix a problem that Nate noticed that boils down to an over conservative checkChris Lattner2006-02-241-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the code that does "select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y)))". We now compile this loop: LBB1_1: ; no_exit add r6, r2, r3 subf r3, r2, r3 cmpwi cr0, r2, 0 addi r7, r5, 4 lwz r2, 0(r5) addi r4, r4, 1 blt cr0, LBB1_4 ; no_exit LBB1_3: ; no_exit mr r3, r6 LBB1_4: ; no_exit cmpwi cr0, r4, 16 mr r5, r7 bne cr0, LBB1_1 ; no_exit into this instead: LBB1_1: ; no_exit srawi r6, r2, 31 add r2, r2, r6 xor r6, r2, r6 addi r7, r5, 4 lwz r2, 0(r5) addi r4, r4, 1 add r3, r3, r6 cmpwi cr0, r4, 16 mr r5, r7 bne cr0, LBB1_1 ; no_exit llvm-svn: 26356
* Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, whichChris Lattner2006-02-221-1/+3
| | | | | | | | | caused SPASS to fail building last night. We can't trivially unswitch a loop if the exit block has phi nodes in it, because we don't know which predecessor to use. llvm-svn: 26320
* Add some comments, simplify some code, and fix a bug that caused rewritingChris Lattner2006-02-221-34/+26
| | | | | | to rewrite with the wrong value. llvm-svn: 26311
* improved support for branch folding, still not enabled.Chris Lattner2006-02-181-143/+269
| | | | llvm-svn: 26289
* Fix bugs identified by VC++.Jeff Cohen2006-02-181-2/+2
| | | | llvm-svn: 26287
* Implement deletion of dead blocks, currently disabled.Chris Lattner2006-02-181-28/+75
| | | | llvm-svn: 26285
* a previous patch completely disabled trivial unswitching, this fixees it.Chris Lattner2006-02-181-1/+0
| | | | | | Thanks to nate for pointing this out :) llvm-svn: 26280
* initial trivial support for folding branches that have now-constant ↵Chris Lattner2006-02-181-3/+34
| | | | | | destinations. llvm-svn: 26279
* When unswitching a loop, make sure to update loop info with exit blocks inChris Lattner2006-02-181-2/+4
| | | | | | the right loop. llvm-svn: 26277
* Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.llChris Lattner2006-02-181-2/+8
| | | | llvm-svn: 26275
* Fix loops where the header has an exit, fixing a loop-unswitch crash on craftyChris Lattner2006-02-171-13/+15
| | | | llvm-svn: 26258
* start of some new simplification code, not thoroughly tested, use at your ownChris Lattner2006-02-171-14/+161
| | | | | | risk :) llvm-svn: 26248
* Rework the SelectionDAG-based implementations of SimplifyDemandedBitsNate Begeman2006-02-161-3/+3
| | | | | | | and ComputeMaskedBits to match the new improved versions in instcombine. Tested against all of multisource/benchmarks on ppc. llvm-svn: 26238
* Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. ↵Chris Lattner2006-02-161-23/+27
| | | | | | | | | | | Apparently they do different things :) This fixes a testcase that nate reduced from spass. Also included are a couple minor code changes that don't affect the generated code at all. llvm-svn: 26235
* Fix VC++ warning.Jeff Cohen2006-02-161-1/+0
| | | | llvm-svn: 26228
* fix a bug where we unswitched the wrong wayChris Lattner2006-02-161-2/+2
| | | | llvm-svn: 26225
OpenPOWER on IntegriCloud