summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallToChris Lattner2006-05-161-1/+139
| | | | | | produce it. llvm-svn: 28338
* 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-161-14/+1
| | | | | | | | | 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
* Revert an un-intended changeEvan Cheng2006-05-131-16/+27
| | | | llvm-svn: 28278
* Remove dead varsChris Lattner2006-05-121-2/+0
| | | | llvm-svn: 28255
* Refactor scheduler code. Move register-reduction list scheduler to aEvan Cheng2006-05-111-25/+20
| | | | | | | separate file. Added an initial implementation of top-down register pressure reduction list scheduler. llvm-svn: 28226
* 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
* 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
* 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
* Sink noop copies into the basic block that uses them. This reduces the numberChris Lattner2006-05-051-4/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of cross-block live ranges, and allows the bb-at-a-time selector to always coallesce these away, at isel time. This reduces the load on the coallescer and register allocator. For example on a codec on X86, we went from: 1643 asm-printer - Number of machine instrs printed 419 liveintervals - Number of loads/stores folded into instructions 1144 liveintervals - Number of identity moves eliminated after coalescing 1022 liveintervals - Number of interval joins performed 282 liveintervals - Number of intervals after coalescing 1304 liveintervals - Number of original intervals 86 regalloc - Number of times we had to backtrack 1.90232 regalloc - Ratio of intervals processed over total intervals 40 spiller - Number of values reused 182 spiller - Number of loads added 121 spiller - Number of stores added 132 spiller - Number of register spills 6 twoaddressinstruction - Number of instructions commuted to coalesce 360 twoaddressinstruction - Number of two-address instructions to: 1636 asm-printer - Number of machine instrs printed 403 liveintervals - Number of loads/stores folded into instructions 1155 liveintervals - Number of identity moves eliminated after coalescing 1033 liveintervals - Number of interval joins performed 279 liveintervals - Number of intervals after coalescing 1312 liveintervals - Number of original intervals 76 regalloc - Number of times we had to backtrack 1.88998 regalloc - Ratio of intervals processed over total intervals 1 spiller - Number of copies elided 41 spiller - Number of values reused 191 spiller - Number of loads added 114 spiller - Number of stores added 128 spiller - Number of register spills 4 twoaddressinstruction - Number of instructions commuted to coalesce 356 twoaddressinstruction - Number of two-address instructions On this testcase, this change provides a modest reduction in spill code, regalloc iterations, and total instructions emitted. It increases the number of register coallesces. llvm-svn: 28115
* Finish up the initial jump table implementation by allowing jump tables toNate Begeman2006-05-031-26/+34
| | | | | | | not be 100% dense. Increase the minimum threshold for the number of cases in a switch statement from 4 to 6 in order to create a jump table. llvm-svn: 28079
* Refactor TargetMachine, pushing handling of TargetData into the ↵Owen Anderson2006-05-031-19/+19
| | | | | | | | target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. This fixes PR 759. llvm-svn: 28074
* Remove the temporary option: -no-isel-fold-inflightEvan Cheng2006-04-281-11/+0
| | | | llvm-svn: 28012
* TargetLowering::LowerArguments should return a VBIT_CONVERT ofEvan Cheng2006-04-281-16/+14
| | | | | | FORMAL_ARGUMENTS SDOperand in the return result vector. llvm-svn: 28009
* Added a temporary option -no-isel-fold-inflight to control whether a "inflight"Evan Cheng2006-04-281-1/+12
| | | | | | node can be folded. llvm-svn: 28003
* Insert a VBIT_CONVERT between a FORMAL_ARGUMENT node and its vector usesEvan Cheng2006-04-271-3/+16
| | | | | | (VAND, VADD, etc.). Legalizer will assert otherwise. llvm-svn: 27991
* Don't forget return void.Evan Cheng2006-04-251-0/+3
| | | | llvm-svn: 27974
* Fix the updating of the machine CFG when a PHI node was in a successor ofNate Begeman2006-04-231-5/+10
| | | | | | | the jump table's range check block. This re-enables 100% dense jump tables by default on PPC & x86 llvm-svn: 27952
* Turn of jump tables for a bit, there are still some issues to work out withNate Begeman2006-04-221-1/+1
| | | | | | updating the machine CFG. llvm-svn: 27949
* JumpTable support! What this represents is working asm and jit support forNate Begeman2006-04-221-6/+138
| | | | | | | | x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. llvm-svn: 27947
* The BFS scheduler is apparently nondeterminstic (causes many llvmgcc bootstrapChris Lattner2006-04-211-2/+5
| | | | | | miscompares). Switch RISC targets to use the list-td scheduler, which isn't. llvm-svn: 27933
* Implement support for the formal_arguments node. To get this, targets ↵Chris Lattner2006-04-121-0/+119
| | | | | | shouldcustom legalize it and remove their XXXTargetLowering::LowerArguments overload llvm-svn: 27604
* Add code generator support for VSELECTChris Lattner2006-04-081-2/+8
| | | | llvm-svn: 27542
* Codegen shufflevector as VVECTOR_SHUFFLEChris Lattner2006-04-081-1/+13
| | | | llvm-svn: 27529
* Stub out shufflevectorChris Lattner2006-04-081-0/+1
| | | | llvm-svn: 27514
* Make a vector live across blocks have the correct Vec type. This fixesChris Lattner2006-04-051-1/+9
| | | | | | CodeGen/X86/2006-04-04-CrossBlockCrash.ll llvm-svn: 27436
* Intrinsics that just load from memory can be treated like loads: they don'tChris Lattner2006-04-021-4/+25
| | | | | | | have to serialize against each other. This allows us to schedule lvx's across each other, for example. llvm-svn: 27346
* Add a new -view-legalize-dags command line optionChris Lattner2006-04-021-2/+1
| | | | llvm-svn: 27342
* Prefer larger register classes over smaller ones when a register occurs inChris Lattner2006-04-021-7/+21
| | | | | | multiple register classes. This fixes PowerPC/2006-04-01-FloatDoubleExtend.ll llvm-svn: 27334
* Make sure to pass enough values to phi nodes when we are dealing withChris Lattner2006-03-311-2/+10
| | | | | | decimated vectors. This fixes UnitTests/Vector/sumarray-dbl.c llvm-svn: 27280
* Significantly improve handling of vectors that are live across basic blocks,Chris Lattner2006-03-311-46/+99
| | | | | | | handling cases where the vector elements need promotion, expansion, and when the vector type itself needs to be decimated. llvm-svn: 27278
* Bug fixes: handle constantexpr insert/extract element operationsChris Lattner2006-03-291-16/+6
| | | | | | | | Handle constantpacked vectors with constantexpr elements. This fixes CodeGen/Generic/vector-constantexpr.ll llvm-svn: 27241
* More bulletproofing of llvm.dbg.declare.Jim Laskey2006-03-281-1/+1
| | | | llvm-svn: 27224
* Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum ↵Chris Lattner2006-03-281-2/+8
| | | | | | value. Split them into separate enums. llvm-svn: 27201
* Reactivate llvm.dbg.declare.Jim Laskey2006-03-271-1/+0
| | | | llvm-svn: 27192
* Disable dbg_declare, it currently breaks the CFE buildChris Lattner2006-03-271-0/+1
| | | | llvm-svn: 27182
* SelectionDAGISel can now natively handle Switch instructions, in the sameNate Begeman2006-03-271-37/+272
| | | | | | | | | | | | | | manner that the LowerSwitch LLVM to LLVM pass does: emitting a binary search tree of basic blocks. The new approach has several advantages: it is faster, it generates significantly smaller code in many cases, and it paves the way for implementing dense switch tables as a jump table by handling switches directly in the instruction selector. This functionality is currently only enabled on x86, but should be safe for every target. In anticipation of making it the default, the cfg is now properly updated in the x86, ppc, and sparc select lowering code. llvm-svn: 27156
* Bullet proof against undefined args produced by upgrading ols-style debug info.Jim Laskey2006-03-261-4/+5
| | | | llvm-svn: 27155
* fix inverted conditionalChris Lattner2006-03-241-2/+2
| | | | llvm-svn: 27089
* Rename for truth in advertising.Jim Laskey2006-03-241-2/+2
| | | | llvm-svn: 27063
* Lower target intrinsics into an INTRINSIC nodeChris Lattner2006-03-241-4/+80
| | | | llvm-svn: 27035
* Handle new forms of llvm.dbg intrinsics.Jim Laskey2006-03-231-24/+69
| | | | llvm-svn: 26988
* Fix a typoChris Lattner2006-03-221-1/+1
| | | | llvm-svn: 26965
* Implement simple support for vector casting. This can currently only handleChris Lattner2006-03-221-43/+21
| | | | | | casts between legal vector types. llvm-svn: 26961
* add some trivial support for extractelement.Chris Lattner2006-03-211-1/+9
| | | | llvm-svn: 26928
* Add a hacky workaround for crashes due to vectors live across blocks.Chris Lattner2006-03-211-0/+26
| | | | | | | Note that this code won't work for vectors that aren't legal on the target. Improvements coming. llvm-svn: 26925
* implement basic support for INSERT_VECTOR_ELT.Chris Lattner2006-03-191-22/+4
| | | | llvm-svn: 26849
* Rename ConstantVec -> BUILD_VECTOR and VConstant -> VBUILD_VECTOR. ↵Chris Lattner2006-03-191-4/+4
| | | | | | Allow*BUILD_VECTOR to take variable inputs. llvm-svn: 26847
* implement vector.ll:test_undefChris Lattner2006-03-191-7/+18
| | | | llvm-svn: 26845
* Change the structure of lowering vector stuff. Note: This breaks someChris Lattner2006-03-181-52/+47
| | | | | | things. llvm-svn: 26840
OpenPOWER on IntegriCloud