summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR1833 - eh.exception and eh.selector return twoDuncan Sands2007-12-311-6/+28
| | | | | | | | values, which means doing extra legalization work. It would be easier to get this kind of thing right if there was some documentation... llvm-svn: 45472
* Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of theOwen Anderson2007-12-311-5/+5
| | | | | | Machine-level API cleanup instigated by Chris. llvm-svn: 45470
* update a couple of references to SSARegMap.Chris Lattner2007-12-311-1/+1
| | | | llvm-svn: 45468
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-315-38/+38
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* fix typo duncan noticed!Chris Lattner2007-12-301-1/+1
| | | | llvm-svn: 45459
* use simplified operand addition methods.Chris Lattner2007-12-301-17/+25
| | | | llvm-svn: 45436
* use simplified operand addition methods.Chris Lattner2007-12-301-30/+22
| | | | llvm-svn: 45435
* Start using the simplified methods for adding operands.Chris Lattner2007-12-301-11/+11
| | | | llvm-svn: 45432
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-2916-32/+32
| | | | llvm-svn: 45418
* remove attribution from lib Makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45415
* Fold comparisons against a constant nan, and optimize ORD/UNORD Chris Lattner2007-12-291-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | comparisons with a constant. This allows us to compile isnan to: _foo: fcmpu cr7, f1, f1 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr instead of: LCPI1_0: ; float .space 4 _foo: lis r2, ha16(LCPI1_0) lfs f0, lo16(LCPI1_0)(r2) fcmpu cr7, f1, f0 mfcr r2 rlwinm r3, r2, 0, 31, 31 blr llvm-svn: 45405
* make sure not to zap volatile stores, thanks a lot to Dale for noticing this!Chris Lattner2007-12-291-1/+2
| | | | llvm-svn: 45402
* don't fold fp_round(fp_extend(load)) -> fp_round(extload)Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45400
* Delete a store whose input is a load from the same pointer:Chris Lattner2007-12-291-1/+12
| | | | | | | x = load p store x -> p llvm-svn: 45398
* initial code for forming an FGETSIGN node. This is disabled untilChris Lattner2007-12-221-0/+26
| | | | | | legalizer support goes in. llvm-svn: 45323
* improve support for fgetsignChris Lattner2007-12-221-0/+6
| | | | llvm-svn: 45322
* Tell TargetLoweringOpt whether it is running beforeChris Lattner2007-12-221-1/+1
| | | | | | or after legalize. llvm-svn: 45321
* Add a new FGETSIGN operation, which defaults to expand on allChris Lattner2007-12-221-1/+5
| | | | | | targets. llvm-svn: 45320
* More accurate checks for two-address constraints.Evan Cheng2007-12-201-8/+40
| | | | llvm-svn: 45259
* Bring back a burr scheduling heuristic that's still needed.Evan Cheng2007-12-201-5/+34
| | | | llvm-svn: 45252
* Simplify LowerCallTo by using a callsite.Duncan Sands2007-12-191-41/+27
| | | | llvm-svn: 45198
* The C++ exception handling personality function wantsDuncan Sands2007-12-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | to know about calls that cannot throw ('nounwind'): if such a call does throw for some reason then the personality will terminate the program. The distinction between an ordinary call and a nounwind call is that an ordinary call gets an entry in the exception table but a nounwind call does not. This patch sets up the exception table appropriately. One oddity is that I've chosen to bracket nounwind calls with labels (like invokes) - the other choice would have been to bracket ordinary calls with labels. While bracketing ordinary calls is more natural (because bracketing by labels would then correspond exactly to getting an entry in the exception table), I didn't do it because introducing labels impedes some optimizations and I'm guessing that ordinary calls occur more often than nounwind calls. This fixes the gcc filter2 eh test, at least at -O0 (the inliner needs some tweaking at higher optimization levels). llvm-svn: 45197
* Don't leave newly created nodes around if it turns out they are not needed.Evan Cheng2007-12-191-2/+4
| | | | llvm-svn: 45186
* Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / ↵Evan Cheng2007-12-181-20/+0
| | | | | | store node id. llvm-svn: 45167
* Also print alignment and volatileness.Evan Cheng2007-12-181-13/+19
| | | | llvm-svn: 45164
* FIX for PR1799: When a load is unfolded from an instruction, check if it is ↵Evan Cheng2007-12-181-26/+36
| | | | | | a new node. If not, do not create a new SUnit. llvm-svn: 45157
* SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.Evan Cheng2007-12-181-0/+18
| | | | llvm-svn: 45151
* Make invokes of inline asm legal. Teach codegenDuncan Sands2007-12-171-17/+20
| | | | | | | | how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). llvm-svn: 45108
* Bug fix. Must also match ResNo when matching an operand with a user.Evan Cheng2007-12-141-1/+1
| | | | llvm-svn: 45028
* Allow vector integer constants to be created withDan Gohman2007-12-121-9/+22
| | | | | | | | SelectionDAG::getConstant, in the same way as vector floating-point constants. This allows the legalize expansion code for @llvm.ctpop and friends to be usable with vector types. llvm-svn: 44954
* Pretty print shuffle mask operand.Evan Cheng2007-12-111-0/+13
| | | | llvm-svn: 44837
* Duncan points out that the subtraction is unneeded since hte codeChris Lattner2007-12-091-1/+1
| | | | | | knows the vector is not pow2 llvm-svn: 44740
* Add support for splitting the operand of a return instruction.Chris Lattner2007-12-093-53/+21
| | | | llvm-svn: 44728
* 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
* Redo previous patch so optimization only done for i1.Dale Johannesen2007-12-061-16/+4
| | | | | | Simpler and safer. llvm-svn: 44663
* 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
OpenPOWER on IntegriCloud