summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement legalize of call nodes.Chris Lattner2005-01-161-3/+17
| | | | llvm-svn: 19617
* Revamp supported ops. Instead of just being supported or not, we now keepChris Lattner2005-01-161-11/+54
| | | | | | | | | | track of how to deal with it, and provide the target with a hook that they can use to legalize arbitrary operations in arbitrary ways. Implement custom lowering for a couple of ops, implement promotion for select operations (which x86 needs). llvm-svn: 19613
* add method stubChris Lattner2005-01-161-0/+5
| | | | llvm-svn: 19612
* Don't mash stuff together.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19611
* Implement some more missing promotions.Chris Lattner2005-01-161-8/+19
| | | | llvm-svn: 19606
* Clarify assertion.Chris Lattner2005-01-161-1/+1
| | | | llvm-svn: 19597
* Add assertions.Chris Lattner2005-01-161-0/+31
| | | | llvm-svn: 19596
* Add support for promoted registers being live across blocks.Chris Lattner2005-01-161-1/+22
| | | | llvm-svn: 19595
* Move some information into the TargetLowering object.Chris Lattner2005-01-161-56/+5
| | | | llvm-svn: 19583
* Use the new TLI method to get this.Chris Lattner2005-01-161-3/+1
| | | | llvm-svn: 19582
* legalize a bunch of operations that I missed.Chris Lattner2005-01-161-9/+19
| | | | llvm-svn: 19580
* Add support for targets that require promotions.Chris Lattner2005-01-161-1/+6
| | | | llvm-svn: 19579
* Fix some serious bugs in promotion.Chris Lattner2005-01-161-2/+2
| | | | llvm-svn: 19578
* Eliminate unneeded extensions.Chris Lattner2005-01-161-0/+9
| | | | llvm-svn: 19577
* Implement promotion of a whole bunch more operators. I think that this isChris Lattner2005-01-151-12/+174
| | | | | | basically everything. llvm-svn: 19576
* Print extra type for nodes with extra type info.Chris Lattner2005-01-152-0/+4
| | | | llvm-svn: 19575
* Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, andChris Lattner2005-01-151-21/+58
| | | | | | ZERO_EXTEND_INREG for targets that don't support them. llvm-svn: 19573
* Common code factored out.Chris Lattner2005-01-151-24/+4
| | | | llvm-svn: 19572
* Add support for promoting ADD/MUL.Chris Lattner2005-01-151-0/+66
| | | | | | | | Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators. Realize that if we do any promotions, we need to iterate SelectionDAG construction. llvm-svn: 19569
* Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.Chris Lattner2005-01-152-17/+57
| | | | llvm-svn: 19568
* Add intitial support for promoting some operators.Chris Lattner2005-01-151-7/+119
| | | | llvm-svn: 19565
* Adjust to CopyFromReg changes, implement deletion of truncating/extendingChris Lattner2005-01-143-6/+38
| | | | | | stores/loads. llvm-svn: 19562
* Start implementing truncating stores and extending loads.Chris Lattner2005-01-142-7/+72
| | | | llvm-svn: 19559
* Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.Chris Lattner2005-01-134-8/+14
| | | | llvm-svn: 19535
* Don't forget the existing root.Chris Lattner2005-01-131-4/+2
| | | | llvm-svn: 19531
* Codegen independent ops as being independent.Chris Lattner2005-01-131-7/+21
| | | | llvm-svn: 19528
* Legalize new node, add assertion.Chris Lattner2005-01-131-0/+16
| | | | llvm-svn: 19527
* Print new node.Chris Lattner2005-01-131-0/+1
| | | | llvm-svn: 19526
* Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.Chris Lattner2005-01-121-2/+2
| | | | | | This fixes llvm-test/SingleSource/Regression/C/casts.c llvm-svn: 19519
* New methodChris Lattner2005-01-121-0/+33
| | | | llvm-svn: 19517
* Fix sign extend to long. When coming from sbyte, we used to generate:Chris Lattner2005-01-121-2/+2
| | | | | | | | | | | | | | | | movsbl 4(%esp), %eax movl %eax, %edx sarl $7, %edx Now we generate: movsbl 4(%esp), %eax movl %eax, %edx sarl $31, %edx Which is right. llvm-svn: 19515
* Shut up warnings with GCC 3.4.3 about uninitialized variables.Reid Spencer2005-01-121-2/+1
| | | | llvm-svn: 19512
* Add an option to view the selection dags as they are generated.Chris Lattner2005-01-121-0/+11
| | | | llvm-svn: 19498
* Print the value types in the nodes of the graphChris Lattner2005-01-111-0/+19
| | | | llvm-svn: 19485
* add an assertion, avoid creating copyfromreg/copytoreg pairs that are theChris Lattner2005-01-111-2/+5
| | | | | | same for PHI nodes. llvm-svn: 19484
* Squelch optimized warning.Chris Lattner2005-01-111-0/+1
| | | | llvm-svn: 19475
* Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the targetChris Lattner2005-01-111-7/+52
| | | | | | does not support them. llvm-svn: 19465
* Print new operations.Chris Lattner2005-01-111-0/+3
| | | | llvm-svn: 19464
* Turn memset/memcpy/memmove into the corresponding operations.Chris Lattner2005-01-111-52/+15
| | | | llvm-svn: 19463
* shift X, 0 -> XChris Lattner2005-01-111-0/+6
| | | | llvm-svn: 19453
* Print SelectionDAGs bottom up, include extra info in the node labelsChris Lattner2005-01-111-3/+38
| | | | llvm-svn: 19447
* Add a marker for the graph root.Chris Lattner2005-01-101-0/+6
| | | | llvm-svn: 19445
* Put the operation name in each node, put the function name on the graph.Chris Lattner2005-01-101-0/+17
| | | | llvm-svn: 19444
* Split out SDNode::getOperationName into its own method.Chris Lattner2005-01-101-89/+88
| | | | llvm-svn: 19443
* Implement initial selectiondag printing support. This gets us a niceChris Lattner2005-01-101-0/+48
| | | | | | graph with no labels! :) llvm-svn: 19441
* Lower to the correct functions. This fixes FreeBench/fourinarowChris Lattner2005-01-101-2/+2
| | | | llvm-svn: 19436
* Implement a couple of more simplifications. This lets us codegen:Chris Lattner2005-01-101-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | int test2(int * P, int* Q, int A, int B) { return P+A == P; } into: test2: movl 4(%esp), %eax movl 12(%esp), %eax shll $2, %eax cmpl $0, %eax sete %al movzbl %al, %eax ret instead of: test2: movl 4(%esp), %eax movl 12(%esp), %ecx leal (%eax,%ecx,4), %ecx cmpl %eax, %ecx sete %al movzbl %al, %eax ret ICC is producing worse code: test2: movl 4(%esp), %eax #8.5 movl 12(%esp), %edx #8.5 lea (%edx,%edx), %ecx #9.9 addl %ecx, %ecx #9.9 addl %eax, %ecx #9.9 cmpl %eax, %ecx #9.16 movl $0, %eax #9.16 sete %al #9.16 ret #9.16 as is GCC (looks like our old code): test2: movl 4(%esp), %edx movl 12(%esp), %eax leal (%edx,%eax,4), %ecx cmpl %edx, %ecx sete %al movzbl %al, %eax ret llvm-svn: 19430
* Fix incorrect constant folds, fixing Stepanov after the SHR patch.Chris Lattner2005-01-101-4/+4
| | | | llvm-svn: 19429
* Constant fold shifts, turning this loop:Chris Lattner2005-01-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .LBB_Z5test0PdS__3: # no_exit.1 fldl data(,%eax,8) fldl 24(%esp) faddp %st(1) fstl 24(%esp) incl %eax movl $16000, %ecx sarl $3, %ecx cmpl %eax, %ecx fstpl 16(%esp) #FP_REG_KILL jg .LBB_Z5test0PdS__3 # no_exit.1 into: .LBB_Z5test0PdS__3: # no_exit.1 fldl data(,%eax,8) fldl 24(%esp) faddp %st(1) fstl 24(%esp) incl %eax cmpl $2000, %eax fstpl 16(%esp) #FP_REG_KILL jl .LBB_Z5test0PdS__3 # no_exit.1 llvm-svn: 19427
* Add some folds for == and != comparisons. This allows us toChris Lattner2005-01-091-41/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | codegen this loop in stepanov: no_exit.i: ; preds = %entry, %no_exit.i, %then.i, %_Z5checkd.exit %i.0.0 = phi int [ 0, %entry ], [ %i.0.0, %no_exit.i ], [ %inc.0, %_Z5checkd.exit ], [ %inc.012, %then.i ] ; <int> [#uses=3] %indvar = phi uint [ %indvar.next, %no_exit.i ], [ 0, %entry ], [ 0, %then.i ], [ 0, %_Z5checkd.exit ] ; <uint> [#uses=3] %result_addr.i.0 = phi double [ %tmp.4.i.i, %no_exit.i ], [ 0.000000e+00, %entry ], [ 0.000000e+00, %then.i ], [ 0.000000e+00, %_Z5checkd.exit ] ; <double> [#uses=1] %first_addr.0.i.2.rec = cast uint %indvar to int ; <int> [#uses=1] %first_addr.0.i.2 = getelementptr [2000 x double]* %data, int 0, uint %indvar ; <double*> [#uses=1] %inc.i.rec = add int %first_addr.0.i.2.rec, 1 ; <int> [#uses=1] %inc.i = getelementptr [2000 x double]* %data, int 0, int %inc.i.rec ; <double*> [#uses=1] %tmp.3.i.i = load double* %first_addr.0.i.2 ; <double> [#uses=1] %tmp.4.i.i = add double %result_addr.i.0, %tmp.3.i.i ; <double> [#uses=2] %tmp.2.i = seteq double* %inc.i, getelementptr ([2000 x double]* %data, int 0, int 2000) ; <bool> [#uses=1] %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1] br bool %tmp.2.i, label %_Z10accumulateIPddET0_T_S2_S1_.exit, label %no_exit.i To this: .LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i fldl data(,%eax,8) fldl 16(%esp) faddp %st(1) fstpl 16(%esp) incl %eax movl %eax, %ecx shll $3, %ecx cmpl $16000, %ecx #FP_REG_KILL jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i instead of this: .LBB_Z4testIPddEvT_S1_T0__1: # no_exit.i fldl data(,%eax,8) fldl 16(%esp) faddp %st(1) fstpl 16(%esp) incl %eax leal data(,%eax,8), %ecx leal data+16000, %edx cmpl %edx, %ecx #FP_REG_KILL jne .LBB_Z4testIPddEvT_S1_T0__1 # no_exit.i llvm-svn: 19425
OpenPOWER on IntegriCloud