summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gccEvan Cheng2006-02-091-0/+9
| | | | | | | | problem where it inline the map insertion call too aggressively. Before this change it was producing a frame size of 24k for Select_store(), now it's down to 10k (by calling this method rather than calling the map insertion operator). llvm-svn: 26094
* More changes to reduce frame size.Evan Cheng2006-02-091-0/+243
| | | | | | | | | Move all getTargetNode() out of SelectionDAG.h into SelectionDAG.cpp. This prevents them from being inlined. Change getTargetNode() so they return SDNode * instead of SDOperand to prevent copying. It should also help compilation speed. llvm-svn: 26083
* * Added SDNode::isOnlyUse().Evan Cheng2006-02-051-3/+18
| | | | | | * Fix hasNUsesOfValue(), it should be const. llvm-svn: 25990
* remove dead fnChris Lattner2006-02-031-11/+0
| | | | llvm-svn: 25935
* Added case HANDLENODE to getOperationName().Evan Cheng2006-02-031-0/+1
| | | | llvm-svn: 25920
* Allow the specification of explicit alignments for constant pool entries.Evan Cheng2006-01-311-8/+14
| | | | llvm-svn: 25855
* Remove some special case hacks for CALLSEQ_*, using UpdateNodeOperandsChris Lattner2006-01-291-44/+6
| | | | | | instead. llvm-svn: 25780
* Legalize ConstantFP into TargetConstantFP when the target allows. ImplementChris Lattner2006-01-291-1/+21
| | | | | | custom expansion of ConstantFP nodes. llvm-svn: 25772
* add another method variantChris Lattner2006-01-281-3/+18
| | | | llvm-svn: 25744
* add some methods for updating nodesChris Lattner2006-01-281-0/+234
| | | | llvm-svn: 25742
* Remove the ISD::CALL and ISD::TAILCALL nodesChris Lattner2006-01-281-3/+1
| | | | llvm-svn: 25721
* initial selectiondag support for new INLINEASM node. Note that inline asmsChris Lattner2006-01-261-1/+2
| | | | | | with outputs or inputs are not supported yet. :) llvm-svn: 25664
* First part of bug 680:Nate Begeman2006-01-251-8/+25
| | | | | | | Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same way as everything else. llvm-svn: 25606
* Fix an infinite loop I caused by making sure to legalize the flag operandChris Lattner2006-01-241-0/+13
| | | | | | of CALLSEQ_* nodes llvm-svn: 25582
* another couple selectsAndrew Lenharth2006-01-231-0/+22
| | | | llvm-svn: 25551
* another selecttoAndrew Lenharth2006-01-231-0/+23
| | | | llvm-svn: 25548
* Constant fold ctpop/ctlz/cttz, and a couple other small cleanupsNate Begeman2006-01-161-2/+58
| | | | llvm-svn: 25357
* add a missing node nameChris Lattner2006-01-151-0/+1
| | | | llvm-svn: 25327
* add stacksave/stackrestore nodesChris Lattner2006-01-131-2/+6
| | | | llvm-svn: 25270
* ignore register #0Evan Cheng2006-01-111-1/+1
| | | | llvm-svn: 25223
* Add bswap, rotl, and rotr nodesNate Begeman2006-01-111-0/+11
| | | | | | | | | Add dag combiner code to recognize rotl, rotr Add ppc code to match rotl Targets should add rotl/rotr patterns if they have them llvm-svn: 25222
* New getNode() variants.Evan Cheng2006-01-091-14/+0
| | | | llvm-svn: 25156
* Added initial support for DEBUG_LABEL allowing debug specific labels to beJim Laskey2006-01-051-0/+1
| | | | | | inserted in the code. llvm-svn: 25104
* Make sure to pass the offset into the new node, so that we don't silentlyNate Begeman2005-12-301-1/+1
| | | | | | drop it on the floor. llvm-svn: 25044
* Fold bitconv(bitconv(x)) -> x. We now compile this:Chris Lattner2005-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | void foo(double); void bar(double X) { foo(X); } to this: bar: save -96, %o6, %o6 or %g0, %i0, %o0 or %g0, %i1, %o1 call foo nop restore %g0, %g0, %g0 retl nop instead of this: bar: save -112, %o6, %o6 st %i1, [%i6+-4] st %i0, [%i6+-8] ldd [%i6+-8], %f0 std %f0, [%i6+-16] ld [%i6+-12], %o1 ld [%i6+-16], %o0 call foo nop restore %g0, %g0, %g0 retl nop on V8. llvm-svn: 24981
* constant fold bits_convert in getNode and in the dag combiner for fp<->intChris Lattner2005-12-231-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversions. This allows V8 to compiles this: void %test() { call float %test2( float 1.000000e+00, float 2.000000e+00, double 3.000000e+00, double* null ) ret void } into: test: save -96, %o6, %o6 sethi 0, %o3 sethi 1049088, %o2 sethi 1048576, %o1 sethi 1040384, %o0 or %g0, %o3, %o4 call test2 nop restore %g0, %g0, %g0 retl nop instead of: test: save -112, %o6, %o6 sethi 0, %o4 sethi 1049088, %l0 st %o4, [%i6+-12] st %l0, [%i6+-16] ld [%i6+-12], %o3 ld [%i6+-16], %o2 sethi 1048576, %o1 sethi 1040384, %o0 call test2 nop restore %g0, %g0, %g0 retl nop llvm-svn: 24980
* add very simple support for the BIT_CONVERT nodeChris Lattner2005-12-231-0/+7
| | | | llvm-svn: 24970
* remove dead codeChris Lattner2005-12-221-1/+0
| | | | llvm-svn: 24965
* Added a hook to print out names of target specific DAG nodes.Evan Cheng2005-12-201-5/+8
| | | | llvm-svn: 24877
* Print out opcode number if it's an unknown target node.Evan Cheng2005-12-191-1/+6
| | | | llvm-svn: 24869
* Fix a case where the DAG Combiner would accidentally CSE flag-producing nodes,Chris Lattner2005-12-191-1/+6
| | | | | | creating graphs that cannot be scheduled. llvm-svn: 24866
* Added source file/line correspondence for dwarf (PowerPC only at this point.)Jim Laskey2005-12-161-0/+1
| | | | llvm-svn: 24748
* Added new getNode and getTargetNode variants for X86 stores.Evan Cheng2005-12-101-60/+73
| | | | llvm-svn: 24653
* Teach the SelectionDAG ISel how to turn ConstantPacked values intoNate Begeman2005-12-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constant nodes with vector types. Also teach the asm printer how to print ConstantPacked constant pool entries. This allows us to generate altivec code such as the following, which adds a vector constantto a packed float. LCPI1_0: <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 > .space 4 .space 4 .space 4 .long 1065353216 ; float 1 .text .align 4 .globl _foo _foo: lis r2, ha16(LCPI1_0) la r2, lo16(LCPI1_0)(r2) li r4, 0 lvx v0, r4, r2 lvx v1, r4, r3 vaddfp v0, v1, v0 stvx v0, r4, r3 blr For the llvm code: void %foo(<4 x float> * %a) { entry: %tmp1 = load <4 x float> * %a; %tmp2 = add <4 x float> %tmp1, < float 0.0, float 0.0, float 0.0, float 1.0 > store <4 x float> %tmp2, <4 x float> *%a ret void } llvm-svn: 24616
* Don't remove two operand, two result nodes from the binary ops map. TheseChris Lattner2005-12-011-36/+39
| | | | | | | | should come from the arbitrary ops map. This fixes Regression/CodeGen/PowerPC/2005-12-01-Crash.ll llvm-svn: 24571
* This is a bugfix for SelectNodeTo. In certain situations, we could beChris Lattner2005-12-011-0/+110
| | | | | | | | | | selecting a node and use a mix of getTargetNode() and SelectNodeTo. Because SelectNodeTo didn't check the CSE maps for a preexisting node and didn't insert its result into the CSE maps, we would sometimes miss a CSE opportunity. This is extremely rare, but worth fixing for completeness. llvm-svn: 24565
* Make SelectNodeTo return NChris Lattner2005-11-301-35/+49
| | | | llvm-svn: 24548
* CALLSEQ_START/END nodes don't get memoized, do not add them in whenChris Lattner2005-11-301-0/+4
| | | | | | replaceAllUses'ing. llvm-svn: 24539
* Fixed a bug introduced by my last commit: TargetGlobalValues should key onEvan Cheng2005-11-301-7/+13
| | | | | | GlobalValue * and index pair. Update getGlobalAddress() for symmetry. llvm-svn: 24524
* Added an index field to GlobalAddressSDNode so it can represent X+12, etc.Evan Cheng2005-11-301-2/+17
| | | | llvm-svn: 24523
* Add support for a new STRING and LOCATION node for line number support, patchChris Lattner2005-11-291-0/+16
| | | | | | contributed by Daniel Berlin, with a few cleanups here and there by me. llvm-svn: 24515
* Check in code to scalarize arbitrarily wide packed types for some simpleNate Begeman2005-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vector operations (load, add, sub, mul). This allows us to codegen: void %foo(<4 x float> * %a) { entry: %tmp1 = load <4 x float> * %a; %tmp2 = add <4 x float> %tmp1, %tmp1 store <4 x float> %tmp2, <4 x float> *%a ret void } on ppc as: _foo: lfs f0, 12(r3) lfs f1, 8(r3) lfs f2, 4(r3) lfs f3, 0(r3) fadds f0, f0, f0 fadds f1, f1, f1 fadds f2, f2, f2 fadds f3, f3, f3 stfs f0, 12(r3) stfs f1, 8(r3) stfs f2, 4(r3) stfs f3, 0(r3) blr llvm-svn: 24484
* Add some method variants, patch by Evan ChengChris Lattner2005-11-191-15/+41
| | | | llvm-svn: 24418
* Teach LLVM how to scalarize packed types. Currently, this only works onNate Begeman2005-11-191-0/+21
| | | | | | | | | | | | | | | | | | | | | | | packed types with an element count of 1, although more generic support is coming. This allows LLVM to turn the following code: void %foo(<1 x float> * %a) { entry: %tmp1 = load <1 x float> * %a; %tmp2 = add <1 x float> %tmp1, %tmp1 store <1 x float> %tmp2, <1 x float> *%a ret void } Into: _foo: lfs f0, 0(r3) fadds f0, f0, f0 stfs f0, 0(r3) blr llvm-svn: 24416
* continued readcyclecounter supportAndrew Lenharth2005-11-111-0/+1
| | | | llvm-svn: 24300
* Switch the allnodes list from a vector of pointers to an ilist of nodes.This ↵Chris Lattner2005-11-091-28/+20
| | | | | | | | eliminates the vector, allows constant time removal of a node froma graph, and makes iteration over the all nodes list stable when adding nodes to the graph. llvm-svn: 24263
* Change the ValueList array for each node to be shared instead of ↵Chris Lattner2005-11-081-5/+48
| | | | | | individuallyallocated. Further, in the common case where a node has a single value, justreference an element from a small array. This is a small compile-time win. llvm-svn: 24251
* Switch the operandlist/valuelist from being vectors to being just an ↵Chris Lattner2005-11-081-23/+33
| | | | | | | | | array.This saves 12 bytes from SDNode, but doesn't speed things up substantially (our graphs apparently already fit within the cache on my g5). In any case this reduces memory usage. llvm-svn: 24249
* Clean up RemoveDeadNodes significantly, by eliminating the need for a temporaryChris Lattner2005-11-081-32/+34
| | | | | | | | set and eliminating the need to iterate whenever something is removed (which can be really slow in some cases). Thx to Jim for pointing out something silly I was getting stuck on. :) llvm-svn: 24241
* add TargetExternalSymbolAndrew Lenharth2005-10-231-1/+13
| | | | llvm-svn: 23886
OpenPOWER on IntegriCloud