summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* add a methodChris Lattner2005-08-241-0/+6
| | | | llvm-svn: 23027
* Add ReplaceAllUsesWith that can take a vector of replacement values.Chris Lattner2005-08-241-15/+90
| | | | | | Add some foldings to hopefully help the illegal setcc issue, and move some code around. llvm-svn: 23025
* teach selection dag mask tracking about the fact that select_cc operates likeChris Lattner2005-08-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select. Also teach it that the bit count instructions can only set the low bits of the result, depending on the size of the input. This allows us to compile this: int %eq0(int %a) { %tmp.1 = seteq int %a, 0 ; <bool> [#uses=1] %tmp.2 = cast bool %tmp.1 to int ; <int> [#uses=1] ret int %tmp.2 } To this: _eq0: cntlzw r2, r3 srwi r3, r2, 5 blr instead of this: _eq0: cntlzw r2, r3 rlwinm r3, r2, 27, 31, 31 blr when setcc is marked illegal on ppc (which restores parity to non-illegal setcc). Thanks to Nate for pointing this out. llvm-svn: 23013
* Teach SelectionDAG how to simplify a few more setcc-equivalent select_ccNate Begeman2005-08-241-6/+21
| | | | | | nodes so that backends don't have to. llvm-svn: 22999
* Fix optimization of select_cc seteq X, 0, 1, 0 -> srl (ctlz X), log2 X sizeNate Begeman2005-08-241-3/+3
| | | | llvm-svn: 22995
* Teach the SelectionDAG how to transform select_cc eq, X, 0, 1, 0 intoNate Begeman2005-08-231-0/+17
| | | | | | | either seteq X, 0 or srl (ctlz X), size(X-1), depending on what's legal for the target. llvm-svn: 22978
* add anew methodChris Lattner2005-08-211-0/+10
| | | | llvm-svn: 22957
* add a methodChris Lattner2005-08-211-0/+9
| | | | llvm-svn: 22955
* add a methodChris Lattner2005-08-211-0/+9
| | | | llvm-svn: 22949
* Add support for TargetGlobalAddress nodesChris Lattner2005-08-191-1/+14
| | | | llvm-svn: 22938
* Fix a bug in previous commitChris Lattner2005-08-191-1/+2
| | | | llvm-svn: 22936
* Print physreg register nodes with target names (e.g. F1) instead of numbersChris Lattner2005-08-191-1/+5
| | | | llvm-svn: 22934
* Fix VC++ precedence warning.Jeff Cohen2005-08-191-1/+1
| | | | llvm-svn: 22902
* Add support for target DAG nodes that take 4 operands, such as PowerPC'sNate Begeman2005-08-181-0/+8
| | | | | | rlwinm. llvm-svn: 22856
* Fix printing of VTSDNodesChris Lattner2005-08-181-0/+3
| | | | llvm-svn: 22853
* Move the code dependency for MathExtras.h from SelectionDAGNodes.h.Jim Laskey2005-08-171-1/+21
| | | | | | Added some class dividers in SelectionDAG.cpp. llvm-svn: 22841
* Culling out use of unions for converting FP to bits and vice versa.Jim Laskey2005-08-171-14/+3
| | | | llvm-svn: 22838
* Fix a bug in RemoveDeadNodes where it would crash when its "optional"Chris Lattner2005-08-171-1/+77
| | | | | | | | argument is not specified. Implement ReplaceAllUsesWith. llvm-svn: 22834
* add a new TargetConstant nodeChris Lattner2005-08-171-1/+19
| | | | llvm-svn: 22813
* Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)Chris Lattner2005-08-161-2/+20
| | | | | | | | | | | | | | used to tack a register number onto the node. Instead of doing this, make a new node, RegisterSDNode, which is a leaf containing a register number. These three operations just become normal DAG nodes now, instead of requiring special handling. Note that with this change, it is no longer correct to make illegal CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this is bad, so don't do it. :) llvm-svn: 22806
* Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nastyNate Begeman2005-08-161-1/+7
| | | | | | | fixme from the PowerPC backend. Emit slightly better code for legalizing select_cc. llvm-svn: 22805
* Allow passing a dag into dump and getOperationName. If one is availableChris Lattner2005-08-161-9/+21
| | | | | | | when printing a node, use it to render target operations with their target instruction name instead of "<<unknown>>". llvm-svn: 22804
* Add some methods for dag->dag isel.Chris Lattner2005-08-161-18/+58
| | | | | | Split RemoveNodeFromCSEMaps out of DeleteNodesIfDead to do it. llvm-svn: 22801
* Remove an unncessary argument to SimplifySelectCC and add an additionalNate Begeman2005-08-131-8/+10
| | | | | | assert when creating a select_cc node. llvm-svn: 22780
* Fix the fabs regression on x86 by abstracting the select_cc optimizationNate Begeman2005-08-131-68/+83
| | | | | | | out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC to use the same set of simplifying folds. llvm-svn: 22779
* implement a couple of simple shift foldings.Chris Lattner2005-08-121-0/+18
| | | | | | e.g. (X & 7) >> 3 -> 0 llvm-svn: 22774
* Add a select_cc optimization for recognizing abs(int). This speeds up anNate Begeman2005-08-111-0/+16
| | | | | | integer MPEG encoding loop by a factor of two. llvm-svn: 22758
* Some SELECT_CC cleanups:Nate Begeman2005-08-111-53/+59
| | | | | | | | | | | | 1. move assertions for node creation to getNode() 2. legalize the values returned in ExpandOp immediately 3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's, allowing them to be cleaned up significantly. This paves the way to pick up additional optimizations on SELECT_CC, such as sum-of-absolute-differences. llvm-svn: 22757
* Add new node, SELECT_CC. This node is for targets that don't nativelyNate Begeman2005-08-101-2/+1
| | | | | | implement SELECT. llvm-svn: 22755
* Fix an oversight that may be causing PR617.Chris Lattner2005-08-101-4/+13
| | | | llvm-svn: 22753
* Fix spelling, fix some broken canonicalizations by my last patchChris Lattner2005-08-091-12/+11
| | | | llvm-svn: 22734
* add cc nodes to the AllNodes list so they show up in Graphviz outputChris Lattner2005-08-091-1/+3
| | | | llvm-svn: 22731
* Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls theChris Lattner2005-08-091-128/+138
| | | | | | | | CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... llvm-svn: 22728
* add a small simplification that can be exposed after promotion/expansionChris Lattner2005-08-071-2/+7
| | | | llvm-svn: 22691
* Fix a use-of-dangling-pointer bug, from the introduction of SrcValue's.Chris Lattner2005-08-051-0/+5
| | | | llvm-svn: 22679
* Update to use the new MathExtras.h support for log2 computation.Chris Lattner2005-08-021-14/+6
| | | | | | Patch contributed by Jim Laskey! llvm-svn: 22594
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-4/+4
| | | | llvm-svn: 22523
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-101-68/+38
| | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. llvm-svn: 22367
* Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNodeChris Lattner2005-07-101-42/+35
| | | | llvm-svn: 22366
* Introduce a new VTSDNode class with the ultimate goal of eliminating theChris Lattner2005-07-101-62/+79
| | | | | | | | MVTSDNode class. This class is used to provide an operand to operators that require an extra type. We start by converting FP_ROUND_INREG and SIGN_EXTEND_INREG over to using it. llvm-svn: 22364
* restore old srcValueNode behavior and try to to work around itAndrew Lenharth2005-06-291-0/+2
| | | | llvm-svn: 22315
* tracking the instructions causing loads and stores provides more information ↵Andrew Lenharth2005-06-291-2/+0
| | | | | | than just the pointer being loaded or stored llvm-svn: 22311
* Fix bug 537 test 2, which checks to make sure that we fold A+(B-A) -> B forNate Begeman2005-06-161-2/+7
| | | | | | | integer types. Add a couple checks to not perform these kinds of transform on floating point values. llvm-svn: 22228
* Add some simplifications for MULH[SU]. This allows us to compile this:Chris Lattner2005-05-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | long %bar(long %X) { %Y = mul long %X, 4294967297 ret long %Y } to this: l1_bar: mov %EAX, DWORD PTR [%ESP + 4] mov %EDX, %EAX add %EDX, DWORD PTR [%ESP + 8] ret instead of: l1_bar: mov %ECX, DWORD PTR [%ESP + 4] mov %EDX, 1 mov %EAX, %ECX mul %EDX add %EDX, %ECX add %EDX, DWORD PTR [%ESP + 8] mov %EAX, %ECX ret llvm-svn: 22044
* remove special case hacks for readport/readio from the binary operatorChris Lattner2005-05-141-6/+1
| | | | | | codepath llvm-svn: 22019
* Implement fixme's by memoizing nodes.Chris Lattner2005-05-141-9/+21
| | | | llvm-svn: 22018
* Turn this into a wrapper for a simpler version of getNode.Chris Lattner2005-05-141-8/+7
| | | | llvm-svn: 22016
* Eliminate special purpose hacks for dynamic_stack_alloc.Chris Lattner2005-05-141-13/+1
| | | | llvm-svn: 22015
* Use the general mechanism for creating multi-value nodes instead of usingChris Lattner2005-05-141-34/+30
| | | | | | special case hacks. llvm-svn: 22014
* Wrap long line, actually add node to the graph.Chris Lattner2005-05-141-1/+3
| | | | llvm-svn: 22011
OpenPOWER on IntegriCloud