summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Use proper debugging facilities so other people don't have to look at my ↵Owen Anderson2007-05-291-14/+18
| | | | | | | | commented-out debugging lines. llvm-svn: 37347
* Comment debug code out that I accidentally uncommented last time.Owen Anderson2007-05-291-2/+2
| | | | llvm-svn: 37346
* Add a place where I missed using the maximal set. Note that using the maximalOwen Anderson2007-05-291-3/+3
| | | | | | set this way is _SLOW_. Somewhere down the line, I'll look at speeding it up. llvm-svn: 37345
* Very first part of a GVN-PRE implementation. It currently performs a bunch ↵Owen Anderson2007-05-291-0/+459
| | | | | | | | of analysis, and nothing more. It is also quite slow for the moment. However, it should give a sense of what's going on. llvm-svn: 37343
* Fix PR1446 by not scalarrepl'ing giant structures.Chris Lattner2007-05-241-1/+5
| | | | llvm-svn: 37326
* Minor comment cleanups.Dan Gohman2007-05-241-1/+1
| | | | llvm-svn: 37321
* fix a miscompilation when passing a float through varargsChris Lattner2007-05-231-2/+1
| | | | llvm-svn: 37297
* Fix Transforms/InstCombine/2007-05-18-CastFoldBug.ll, a bug that devastatesChris Lattner2007-05-191-0/+8
| | | | | | objc code due to the way the FE lowers objc message sends. llvm-svn: 37256
* Handle negative strides much more optimally. This compiles ↵Chris Lattner2007-05-191-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X86/lsr-negative-stride.ll into: _t: movl 8(%esp), %ecx movl 4(%esp), %eax cmpl %ecx, %eax je LBB1_3 #bb17 LBB1_1: #bb cmpl %ecx, %eax jg LBB1_4 #cond_true LBB1_2: #cond_false subl %eax, %ecx cmpl %ecx, %eax jne LBB1_1 #bb LBB1_3: #bb17 ret LBB1_4: #cond_true subl %ecx, %eax cmpl %ecx, %eax jne LBB1_1 #bb jmp LBB1_3 #bb17 instead of: _t: subl $4, %esp movl %esi, (%esp) movl 12(%esp), %ecx movl 8(%esp), %eax cmpl %ecx, %eax je LBB1_4 #bb17 LBB1_1: #bb.outer movl %ecx, %edx negl %edx LBB1_2: #bb cmpl %ecx, %eax jle LBB1_5 #cond_false LBB1_3: #cond_true addl %edx, %eax cmpl %ecx, %eax jne LBB1_2 #bb LBB1_4: #bb17 movl (%esp), %esi addl $4, %esp ret LBB1_5: #cond_false movl %ecx, %edx subl %eax, %edx movl %eax, %esi addl %esi, %esi cmpl %ecx, %esi je LBB1_4 #bb17 LBB1_6: #cond_false.bb.outer_crit_edge movl %edx, %ecx jmp LBB1_1 #bb.outer llvm-svn: 37252
* Fix PR1431Devang Patel2007-05-171-1/+1
| | | | | | Test case at Transformations/SCCP/2007-05-16-InvokeCrash.ll llvm-svn: 37185
* selects can also reach hereChris Lattner2007-05-151-2/+3
| | | | llvm-svn: 37081
* Fix Transforms/InstCombine/2007-05-14-Crash.llChris Lattner2007-05-151-7/+16
| | | | llvm-svn: 37057
* Correct a few comments.Dan Gohman2007-05-141-5/+5
| | | | llvm-svn: 37034
* Fix Transforms/GlobalOpt/2007-05-13-Crash.llChris Lattner2007-05-131-1/+4
| | | | llvm-svn: 37020
* significantly improve debug output of lsrChris Lattner2007-05-111-6/+13
| | | | llvm-svn: 36996
* Fix typos.Dan Gohman2007-05-113-4/+4
| | | | llvm-svn: 36994
* This patch extends the LoopUnroll pass to be able to unroll loopsDan Gohman2007-05-111-58/+193
| | | | | | | | | | | | | | | | | with unknown trip counts. This is left off by default, and a command-line option enables it. It also begins to separate loop unrolling into a utility routine; eventually it might be made usable from other passes. It currently works by inserting conditional branches between each unrolled iteration, unless it proves that the trip count is a multiple of a constant integer > 1, which it currently only does in the rare case that the trip count expression is a Mul operator with a ConstantInt operand. Eventually this information might be provided by other sources, for example by a pass that peels/splits the loop for this purpose. llvm-svn: 36990
* fix regressions from my previous checking, includingChris Lattner2007-05-111-2/+2
| | | | | | Transforms/InstCombine/2006-12-08-ICmp-Combining.ll llvm-svn: 36989
* fix Transforms/InstCombine/2007-05-10-icmp-or.llChris Lattner2007-05-111-5/+10
| | | | llvm-svn: 36984
* Fix PR1333Devang Patel2007-05-091-5/+25
| | | | | | | | Testcases : http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049452.html llvm-svn: 36955
* Fix various whitespace inconsistencies.Dan Gohman2007-05-081-10/+10
| | | | llvm-svn: 36936
* Correct the comment for ApproximateLoopSize to reflect what it actually does.Dan Gohman2007-05-081-2/+1
| | | | llvm-svn: 36935
* Don't generate branch to entry block.Dale Johannesen2007-05-081-1/+3
| | | | llvm-svn: 36917
* Fix PR1395, by passing the ID correctlyChris Lattner2007-05-063-5/+4
| | | | llvm-svn: 36894
* Fix typo in comment.Nick Lewycky2007-05-0650-55/+55
| | | | llvm-svn: 36873
* Fix a bug in my previous patchChris Lattner2007-05-061-1/+1
| | | | llvm-svn: 36857
* Implement Transforms/InstCombine/cast_ptr.llChris Lattner2007-05-051-1/+22
| | | | llvm-svn: 36809
* wrap long linesChris Lattner2007-05-053-14/+15
| | | | llvm-svn: 36807
* Fix Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll and PR1385.Chris Lattner2007-05-051-18/+17
| | | | | | | | If we have a LCSSA, only modify the input value if the inval was defined by an instruction in the loop. If defined by something before the loop, it is still valid. llvm-svn: 36784
* make a temporary for *SI, no functionality change.Chris Lattner2007-05-051-6/+7
| | | | llvm-svn: 36782
* Fix InstCombine/2007-05-04-Crash.ll and PR1384Chris Lattner2007-05-051-10/+14
| | | | llvm-svn: 36775
* Use IntrinsicInst to test for prefetch instructions, which is ever soDan Gohman2007-05-041-6/+5
| | | | | | slightly nicer than using CallInst with an extra check; thanks Chris. llvm-svn: 36743
* Allow strength reduction to make use of addressing modes for theDan Gohman2007-05-031-1/+10
| | | | | | address operand in a prefetch intrinsic. llvm-svn: 36713
* Drop 'const'Devang Patel2007-05-0360-133/+133
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-0260-133/+133
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Fix build error.Lauro Ramos Venancio2007-05-021-3/+4
| | | | llvm-svn: 36648
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-0160-18/+260
| | | | llvm-svn: 36632
* Implement review feedbackAnton Korobeynikov2007-04-291-1/+1
| | | | llvm-svn: 36564
* Implement review feedback. Aliasees can be either GlobalValue's orAnton Korobeynikov2007-04-281-6/+2
| | | | | | bitcasts of them. llvm-svn: 36537
* fix a bug triggered by 403.gccChris Lattner2007-04-281-2/+1
| | | | llvm-svn: 36527
* Fix several latent bugs in EmitGEPOffset that didn't manifest with itsChris Lattner2007-04-281-36/+52
| | | | | | previous clients. This fixes MallocBench/gs llvm-svn: 36525
* uhn zap cvsChris Lattner2007-04-281-6/+0
| | | | llvm-svn: 36523
* Implement PR1345 and Transforms/InstCombine/bitcast-gep.llChris Lattner2007-04-281-28/+104
| | | | llvm-svn: 36521
* refactor some code relating to pointer cast xforms, pulling it out of the ↵Chris Lattner2007-04-271-53/+56
| | | | | | | | codepath for unrelated casts. llvm-svn: 36511
* Using APInt more efficiently.Zhou Sheng2007-04-261-5/+4
| | | | llvm-svn: 36475
* Mem2Reg does not need TargetData.Devang Patel2007-04-254-15/+9
| | | | llvm-svn: 36444
* Remove unused function argument.Devang Patel2007-04-253-4/+4
| | | | llvm-svn: 36441
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-1/+12
| | | | | | will follow. llvm-svn: 36435
* If an alloca only has two types of uses: 1) reads 2) a memcpy/memmove thatChris Lattner2007-04-251-4/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | copies from a constant global, then we can change the reads to read from the global instead of from the alloca. This eliminates the alloca and the memcpy, and promotes secondary optimizations (because the loads are now loads from a constant global). This is important for a common C idiom: void foo() { int A[] = {1,2,3,4,5,6,7,8,9...}; ... only reads of A ... } For some reason, people forget to mark the array static or const. This triggers on these multisource benchmarks: JM/ldecode: block_pos, [3 x [4 x [4 x i32]]] FreeBench/mason: m, [18 x i32], inlined 4 times MiBench/office-stringsearch: search_strings, [1332 x i8*] MiBench/office-stringsearch: find_strings, [1333 x i8*] Prolangs-C++/city: dirs, [9 x i8*], inlined 4 places and these spec benchmarks: 177.mesa: message, [8 x [32 x i8]] 186.crafty: bias_rl45, [64 x i32] 186.crafty: diag_sq, [64 x i32] 186.crafty: empty, [9 x i8] 186.crafty: xlate, [15 x i8] 186.crafty: status, [13 x i8] 186.crafty: bdinfo, [25 x i8] 445.gobmk: routines, [16 x i8*] 458.sjeng: piece_rep, [14 x i8*] 458.sjeng: t, [13 x i32], inlined 4 places. 464.h264ref: block8x8_idx, [3 x [4 x [4 x i32]]] 464.h264ref: block_pos, [3 x [4 x [4 x i32]]] 464.h264ref: j_off_tab, [12 x i32] This implements Transforms/ScalarRepl/memcpy-from-global.ll llvm-svn: 36429
* refactor the SROA code out into its own method, no functionality change.Chris Lattner2007-04-251-98/+107
| | | | llvm-svn: 36426
OpenPOWER on IntegriCloud