summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add support for splitting the operand of a return instruction.Chris Lattner2007-12-093-53/+21
| | | | llvm-svn: 44728
* Reverting 44702. It wasn't correct to rename them.Bill Wendling2007-12-082-14/+14
| | | | llvm-svn: 44727
* add many new cases to SplitResult. SplitResult now handles all the cases ↵Chris Lattner2007-12-082-3/+178
| | | | | | that LegalizeDAG does. llvm-svn: 44726
* Implement splitting support for store, allowing us to compile:Chris Lattner2007-12-082-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | %f8 = type <8 x float> define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) { %p = load %f8* %P ; <%f8> [#uses=1] %q = load %f8* %Q ; <%f8> [#uses=1] %R = add %f8 %p, %q ; <%f8> [#uses=1] store %f8 %R, %f8* %S ret void } into: _test_f8: movaps 16(%rdi), %xmm0 addps 16(%rsi), %xmm0 movaps (%rdi), %xmm1 addps (%rsi), %xmm1 movaps %xmm0, 16(%rdx) movaps %xmm1, (%rdx) ret llvm-svn: 44725
* implement vector splitting of load, undef, and binops.Chris Lattner2007-12-082-4/+88
| | | | llvm-svn: 44724
* implement some methods.Chris Lattner2007-12-082-2/+29
| | | | llvm-svn: 44723
* add scaffolding for splitting of vectors.Chris Lattner2007-12-083-4/+138
| | | | llvm-svn: 44722
* reorganize header to separate into functional blocks.Chris Lattner2007-12-081-47/+59
| | | | llvm-svn: 44719
* split scalarization out to its own file.Chris Lattner2007-12-082-183/+202
| | | | llvm-svn: 44718
* Split expansion out into its own file.Chris Lattner2007-12-082-1144/+1166
| | | | llvm-svn: 44717
* Split promotion support out to its own file.Chris Lattner2007-12-082-472/+490
| | | | llvm-svn: 44716
* Rename LegalizeDAGTypes.cpp -> LegalizeTypes.cppChris Lattner2007-12-081-1/+0
| | | | llvm-svn: 44715
* Split the class definition of DAGTypeLegalizer out into a header.Chris Lattner2007-12-082-234/+256
| | | | | | Leave it visibility hidden, but not in an anon namespace. llvm-svn: 44714
* 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
OpenPOWER on IntegriCloud