summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
...
* Change RET node to include signness information of the return values. e.g.Evan Cheng2006-05-262-9/+17
| | | | | | RET chain, value1, sign1, value2, sign2 llvm-svn: 28509
* Turn on -sched-commute-nodes by default.Evan Cheng2006-05-251-7/+2
| | | | llvm-svn: 28465
* CALL node change: now including signness of every argument.Evan Cheng2006-05-251-2/+7
| | | | llvm-svn: 28461
* Patches to make the LLVM sources more -pedantic clean. Patch providedChris Lattner2006-05-241-1/+1
| | | | | | by Anton Korobeynikov! This is a step towards closing PR786. llvm-svn: 28447
* -enable-unsafe-fp-math implies -enable-finite-only-fp-mathEvan Cheng2006-05-231-2/+1
| | | | llvm-svn: 28437
* Fix missing includeVladimir Prus2006-05-231-0/+1
| | | | llvm-svn: 28435
* Incorrect SETCC CondCode used for FP comparisons.Evan Cheng2006-05-231-9/+20
| | | | llvm-svn: 28433
* lib/Target/Target.tdEvan Cheng2006-05-181-12/+13
| | | | llvm-svn: 28386
* Fix the result of the call to use a correct vbitconvert. There is no need toChris Lattner2006-05-171-23/+8
| | | | | | use getPackedTypeBreakdown at all here. llvm-svn: 28365
* Correct a previous patch which broke CodeGen/PowerPC/vec_call.llChris Lattner2006-05-171-18/+5
| | | | llvm-svn: 28364
* Fixed a LowerCallTo and LowerArguments bug. They were introducing illegalEvan Cheng2006-05-171-12/+27
| | | | | | | | VBIT_VECTOR nodes. There were some confusion about the semantics of getPackedTypeBreakdown(). e.g. for <4 x f32> it returns 1 and v4f32, not 4, and f32. llvm-svn: 28352
* When we legalize target nodes, do not use getNode to create a new node,Chris Lattner2006-05-171-13/+4
| | | | | | | | | | | | use UpdateNodeOperands to just update the operands! This is important because getNode will allocate a new node if the node returns a flag and this breaks assumptions in the legalizer that you can legalize some things multiple times and get exactly the same results. This latent bug was exposed by my ppc patch last night, and this fixes gsm/toast. llvm-svn: 28348
* Add an assertion, avoid some unneeded work for each call. No functionalityChris Lattner2006-05-171-6/+10
| | | | | | change. llvm-svn: 28347
* Add support for calls that pass and return legal vectors.Chris Lattner2006-05-161-3/+60
| | | | llvm-svn: 28340
* Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallToChris Lattner2006-05-163-3/+143
| | | | | | produce it. llvm-svn: 28338
* Move this code to a common placeAndrew Lenharth2006-05-161-238/+14
| | | | llvm-svn: 28329
* Add a chain to FORMAL_ARGUMENTS. This is a minimal port of the X86 backend,Chris Lattner2006-05-161-2/+4
| | | | | | | it doesn't currently use/maintain the chain properly. Also, make the X86ISelLowering.cpp file 80-col clean. llvm-svn: 28320
* Move function-live-in-handling code from the sdisel code to the scheduler.Chris Lattner2006-05-162-14/+15
| | | | | | | | | This code should be emitted after legalize, so it can't be in sdisel. Note that the EmitFunctionEntryCode hook should be updated to operate on the DAG. The X86 backend is the only one currently using this hook. llvm-svn: 28315
* Legalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them onceChris Lattner2006-05-161-2/+11
| | | | | | for each argument. llvm-svn: 28313
* Fixing 2006-05-01-SchedCausingSpills.ll; some clean upEvan Cheng2006-05-132-15/+69
| | | | llvm-svn: 28279
* Revert an un-intended changeEvan Cheng2006-05-131-16/+27
| | | | llvm-svn: 28278
* Merge identical code.Chris Lattner2006-05-131-8/+0
| | | | llvm-svn: 28274
* Remove dead varsChris Lattner2006-05-121-2/+0
| | | | llvm-svn: 28255
* remove dead varsChris Lattner2006-05-121-2/+1
| | | | llvm-svn: 28254
* Comment out dead variablesChris Lattner2006-05-121-2/+2
| | | | llvm-svn: 28252
* Compile:Chris Lattner2006-05-121-1/+6
| | | | | | | | | | %tmp152 = setgt uint %tmp144, %tmp149 ; <bool> [#uses=1] %tmp159 = setlt uint %tmp144, %tmp149 ; <bool> [#uses=1] %bothcond2 = or bool %tmp152, %tmp159 ; <bool> [#uses=1] To setne, not setune, which causes an assertion fault. llvm-svn: 28244
* Refactor a bunch of includes so that TargetMachine.h doesn't have to includeOwen Anderson2006-05-124-0/+4
| | | | | | | TargetData.h. This should make recompiles a bit faster with my current TargetData tinkering. llvm-svn: 28238
* Duh. That could take a long time.Evan Cheng2006-05-121-11/+15
| | | | llvm-svn: 28235
* Two simplifications for token factor nodes: simplify tf(x,x) -> x.Chris Lattner2006-05-121-2/+6
| | | | | | simplify tf(x,y,y,z) -> tf(x,y,z). llvm-svn: 28233
* Add capability to scheduler to commute nodes for profit.Evan Cheng2006-05-122-31/+61
| | | | | | | If a two-address code whose first operand has uses below, it should be commuted when possible. llvm-svn: 28230
* Refactor scheduler code. Move register-reduction list scheduler to aEvan Cheng2006-05-114-932/+1104
| | | | | | | separate file. Added an initial implementation of top-down register pressure reduction list scheduler. llvm-svn: 28226
* Templatify RegReductionPriorityQueueEvan Cheng2006-05-101-7/+12
| | | | llvm-svn: 28212
* Fix PR773Nate Begeman2006-05-091-2/+20
| | | | llvm-svn: 28207
* Add pseudo dependency to force a def&use operand to be scheduled last (unlessEvan Cheng2006-05-091-17/+108
| | | | | | | the distance between the def and another use is much longer). This is under option control for now "-sched-lower-defnuse". llvm-svn: 28201
* Debugging infoEvan Cheng2006-05-091-3/+3
| | | | llvm-svn: 28200
* Make the case I just checked in stronger. Now we compile this:Chris Lattner2006-05-081-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | short test2(short X, short x) { int Y = (short)(X+x); return Y >> 1; } to: _test2: add r2, r3, r4 extsh r2, r2 srawi r3, r2, 1 blr instead of: _test2: add r2, r3, r4 extsh r2, r2 srwi r2, r2, 1 extsh r3, r2 blr llvm-svn: 28175
* Implement and_sext.ll:test3, generating:Chris Lattner2006-05-081-1/+8
| | | | | | | | | | | | | | | | | | | | | _test4: srawi r3, r3, 16 blr instead of: _test4: srwi r2, r3, 16 extsh r3, r2 blr for: short test4(unsigned X) { return (X >> 16); } llvm-svn: 28174
* Compile this:Chris Lattner2006-05-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | short test4(unsigned X) { return (X >> 16); } to: _test4: movl 4(%esp), %eax sarl $16, %eax ret instead of: _test4: movl $-65536, %eax andl 4(%esp), %eax sarl $16, %eax ret llvm-svn: 28171
* Fold shifts with undef operands.Chris Lattner2006-05-081-0/+7
| | | | llvm-svn: 28167
* Make emission of jump tables a bit less conservative; they are now requiredNate Begeman2006-05-081-4/+4
| | | | | | to be only 31.25% dense, rather than 75% dense. llvm-svn: 28165
* Fix PR772Nate Begeman2006-05-081-9/+9
| | | | llvm-svn: 28161
* Simplify some code, add a couple minor missed foldsChris Lattner2006-05-061-21/+16
| | | | llvm-svn: 28152
* constant fold sign_extend_inregChris Lattner2006-05-061-1/+9
| | | | llvm-svn: 28151
* remove cases handled elsewhereChris Lattner2006-05-061-16/+2
| | | | llvm-svn: 28150
* Use the new TargetLowering::ComputeNumSignBits method to eliminateChris Lattner2006-05-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sign_extend_inreg operations. Though ComputeNumSignBits is still rudimentary, this is enough to compile this: short test(short X, short x) { int Y = X+x; return (Y >> 1); } short test2(short X, short x) { int Y = (short)(X+x); return Y >> 1; } into: _test: add r2, r3, r4 srawi r3, r2, 1 blr _test2: add r2, r3, r4 extsh r2, r2 srawi r3, r2, 1 blr instead of: _test: add r2, r3, r4 srawi r2, r2, 1 extsh r3, r2 blr _test2: add r2, r3, r4 extsh r2, r2 srawi r2, r2, 1 extsh r3, r2 blr llvm-svn: 28146
* When inserting casts, be careful of where we put them. We cannot insertChris Lattner2006-05-061-9/+12
| | | | | | | | a cast immediately before a PHI node. This fixes Regression/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll llvm-svn: 28143
* Fold trunc(any_ext). This gives stuff like:Chris Lattner2006-05-051-1/+2
| | | | | | | | | | 27,28c27 < movzwl %di, %edi < movl %edi, %ebx --- > movw %di, %bx llvm-svn: 28137
* Shrink shifts when possible.Chris Lattner2006-05-051-0/+12
| | | | llvm-svn: 28136
* Fold (fpext (load x)) -> (extload x)Chris Lattner2006-05-051-0/+14
| | | | llvm-svn: 28130
* More aggressively sink GEP offsets into loops. For example, before weChris Lattner2006-05-051-56/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated: movl 8(%esp), %eax movl %eax, %edx addl $4316, %edx cmpb $1, %cl ja LBB1_2 #cond_false LBB1_1: #cond_true movl L_QuantizationTables720$non_lazy_ptr, %ecx movl %ecx, (%edx) movl L_QNOtoQuantTableShift720$non_lazy_ptr, %edx movl %edx, 4460(%eax) ret ... Now we generate: movl 8(%esp), %eax cmpb $1, %cl ja LBB1_2 #cond_false LBB1_1: #cond_true movl L_QuantizationTables720$non_lazy_ptr, %ecx movl %ecx, 4316(%eax) movl L_QNOtoQuantTableShift720$non_lazy_ptr, %ecx movl %ecx, 4460(%eax) ret ... which uses one fewer register. llvm-svn: 28129
OpenPOWER on IntegriCloud