summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Renaming:Bill Wendling2007-12-082-2/+2
| | | | | | | isTriviallyReMaterializable -> hasNoSideEffects isReallyTriviallyReMaterializable -> isTriviallyReMaterializable llvm-svn: 44702
* Incorporated comments from Evan and Chris:Bill Wendling2007-12-081-58/+54
| | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html llvm-svn: 44696
* Initial commit of the machine code LICM pass. It successfully hoists this:Bill Wendling2007-12-072-4/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _foo: li r2, 0 LBB1_1: ; bb li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr to: _foo: li r2, 0 li r5, 0 LBB1_1: ; bb stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr ZOMG!! :-) Moar to come... llvm-svn: 44687
* Add an option to control this heuristic tweak so I can test it.Evan Cheng2007-12-071-1/+6
| | | | llvm-svn: 44671
* Redo previous patch so optimization only done for i1.Dale Johannesen2007-12-061-16/+4
| | | | | | Simpler and safer. llvm-svn: 44663
* Turning simple splitting on. Start testing new coalescer heuristics as new ↵Evan Cheng2007-12-061-1/+1
| | | | | | llcbeta. llvm-svn: 44660
* third time around: instead of disabling this completely,Chris Lattner2007-12-061-6/+13
| | | | | | | only disable it if we don't know it will be obviously profitable. Still fixme, but less so. :) llvm-svn: 44658
* Actually, disable this code for now. More analysis and improvements toChris Lattner2007-12-061-0/+6
| | | | | | the X86 backend are needed before this should be enabled by default. llvm-svn: 44657
* implement a readme entry, compiling the code into:Chris Lattner2007-12-061-19/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _foo: movl $12, %eax andl 4(%esp), %eax movl _array(%eax), %eax ret instead of: _foo: movl 4(%esp), %eax shrl $2, %eax andl $3, %eax movl _array(,%eax,4), %eax ret As it turns out, this triggers all the time, in a wide variety of situations, for example, I see diffs like this in various programs: - movl 8(%eax), %eax - shll $2, %eax - andl $1020, %eax - movl (%esi,%eax), %eax + movzbl 8(%eax), %eax + movl (%esi,%eax,4), %eax - shll $2, %edx - andl $1020, %edx - movl (%edi,%edx), %edx + andl $255, %edx + movl (%edi,%edx,4), %edx Unfortunately, I also see stuff like this, which can be fixed in the X86 backend: - andl $85, %ebx - addl _bit_count(,%ebx,4), %ebp + shll $2, %ebx + andl $340, %ebx + addl _bit_count(%ebx), %ebp llvm-svn: 44656
* implement the rest of the functionality from ↵Chris Lattner2007-12-061-10/+24
| | | | | | SelectionDAGLegalize::ScalarizeVectorOp llvm-svn: 44654
* Fix PR1842.Dale Johannesen2007-12-061-4/+16
| | | | llvm-svn: 44649
* Fix for PR1831: if all defs of an interval are re-materializable, then it's ↵Evan Cheng2007-12-062-4/+48
| | | | | | a preferred spill candiate. llvm-svn: 44644
* MachineInstr can change. Store indexes instead.Evan Cheng2007-12-053-14/+23
| | | | llvm-svn: 44612
* If a split live interval is spilled again, remove the kill marker on its ↵Evan Cheng2007-12-053-2/+25
| | | | | | last use. llvm-svn: 44611
* Clobber more bugs.Evan Cheng2007-12-051-2/+3
| | | | llvm-svn: 44610
* Fix kill info for split intervals.Evan Cheng2007-12-053-23/+37
| | | | llvm-svn: 44609
* more scalarizationChris Lattner2007-12-051-0/+30
| | | | llvm-svn: 44608
* scalarize vector binopsChris Lattner2007-12-051-1/+24
| | | | llvm-svn: 44607
* - Mark last use of a split interval as kill instead of letting spiller track it.Evan Cheng2007-12-052-28/+73
| | | | | | | | | This allows an important optimization to be re-enabled. - If all uses / defs of a split interval can be folded, give the interval a low spill weight so it would not be picked in case spilling is needed (avoid pushing other intervals in the same BB to be spilled). llvm-svn: 44601
* Add a argument to storeRegToStackSlot and storeRegToAddr to specify whetherEvan Cheng2007-12-056-16/+12
| | | | | | the stored register is killed. llvm-svn: 44600
* Remove a unsafe optimization. This fixes 401.bzip2.Evan Cheng2007-12-041-8/+0
| | | | llvm-svn: 44587
* Spiller unfold optimization bug: do not clobber a reusable stack slot value ↵Evan Cheng2007-12-041-10/+16
| | | | | | unless it can be modified. llvm-svn: 44575
* Implement framework for scalarizing node results. This is sufficient Chris Lattner2007-12-041-11/+80
| | | | | | | | | | | | to codegen this: define float @test_extract_elt(<1 x float> * %P) { %p = load <1 x float>* %P %R = extractelement <1 x float> %p, i32 0 ret float %R } llvm-svn: 44570
* start providing framework for scalarizing vectors.Chris Lattner2007-12-041-4/+106
| | | | llvm-svn: 44569
* Discard split intervals made empty due to folding.Evan Cheng2007-12-041-5/+16
| | | | llvm-svn: 44565
* Bug fixes.Evan Cheng2007-12-031-7/+8
| | | | llvm-svn: 44549
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-21/+3
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* TypoEvan Cheng2007-12-031-1/+1
| | | | llvm-svn: 44532
* Update kill info for uses of split intervals.Evan Cheng2007-12-032-11/+17
| | | | llvm-svn: 44531
* Remove redundant foldMemoryOperand variants and other code clean up.Evan Cheng2007-12-025-90/+85
| | | | llvm-svn: 44517
* Fix a bug where splitting cause some unnecessary spilling.Evan Cheng2007-12-011-2/+12
| | | | llvm-svn: 44482
* Allow some reloads to be folded in multi-use cases. Specifically testl r, r ↵Evan Cheng2007-12-011-22/+32
| | | | | | -> cmpl [mem], 0. llvm-svn: 44479
* Do not fold reload into an instruction with multiple uses. It issues one ↵Evan Cheng2007-11-301-75/+86
| | | | | | extra load. llvm-svn: 44467
* Provide a way to update DescGlobals cache directly.Devang Patel2007-11-301-0/+6
| | | | llvm-svn: 44446
* Do not lose rematerialization info when spilling already split live intervals.Evan Cheng2007-11-291-14/+9
| | | | llvm-svn: 44443
* Fix a major performance issue with splitting. If there is a def (not def/use)Evan Cheng2007-11-291-60/+133
| | | | | | | | | | | | | | | in the middle of a split basic block, create a new live interval starting at the def. This avoid artifically extending the live interval over a number of cycles where it is dead. e.g. bb1: = vr1204 (use / kill) <= new interval starts and ends here. ... ... vr1204 = (new def) <= start a new interval here. = vr1204 (use) llvm-svn: 44436
* Replace the odd kill# hack with something less fragile.Evan Cheng2007-11-293-16/+17
| | | | llvm-svn: 44434
* Fixed various live interval splitting bugs / compile time issues.Evan Cheng2007-11-293-157/+266
| | | | llvm-svn: 44428
* Kill info update bug.Evan Cheng2007-11-291-0/+3
| | | | llvm-svn: 44427
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-12/+11
| | | | | | use them. llvm-svn: 44403
* Add missing newlines at EOF.Duncan Sands2007-11-281-1/+1
| | | | llvm-svn: 44399
* Recover compile time regression.Evan Cheng2007-11-283-86/+73
| | | | llvm-svn: 44386
* Add MachineLoopInfo. This is not yet tested.Owen Anderson2007-11-271-0/+41
| | | | llvm-svn: 44384
* Support returning non-power-of-2 vectors to unblock some workNate Begeman2007-11-271-0/+7
| | | | llvm-svn: 44371
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-12/+10
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* err, no really.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44352
* don't depend on ADL.Chris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44351
* Don't lower srem/urem X%C to X-X/C*C unless the division is actuallyDan Gohman2007-11-261-14/+18
| | | | | | | | | optimized. This avoids creating illegal divisions when the combiner is running after legalize; this fixes PR1815. Also, it produces better code in the included testcase by avoiding the subtract and multiply when the division isn't optimized. llvm-svn: 44341
* Implement expand support for MERGE_VALUEs that only produces one result.Chris Lattner2007-11-241-0/+4
| | | | llvm-svn: 44304
* Implement support for custom legalization in DAGTypeLegalizer::ExpandOperand.Chris Lattner2007-11-241-30/+43
| | | | | | | | Improve a comment. Unbreak Duncan's carefully written path compression where I didn't realize what was happening! llvm-svn: 44301
OpenPOWER on IntegriCloud