summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a linked data structure for the uses lists of an SDNode, just like Roman Levenstein2008-03-261-70/+99
| | | | | | | | | | | | | LLVM Value/Use does and MachineRegisterInfo/MachineOperand does. This allows constant time for all uses list maintenance operations. The idea was suggested by Chris. Reviewed by Evan and Dan. Patch is tested and approved by Dan. On normal use-cases compilation speed is not affected. On very big basic blocks there are compilation speedups in the range of 15-20% or even better. llvm-svn: 48822
* Handle a special case xor undef, undef -> 0. Technically this should be ↵Evan Cheng2008-03-251-1/+6
| | | | | | transformed to undef. But this is such a common idiom (misuse) we are going to handle it. llvm-svn: 48792
* APIntify SelectionDAG's EXTRACT_ELEMENT code.Dan Gohman2008-03-241-2/+4
| | | | llvm-svn: 48726
* Another comments fixingAnton Korobeynikov2008-03-221-1/+1
| | | | llvm-svn: 48683
* Teach DAG combiner to commute commutable binary nodes in order to achieve ↵Evan Cheng2008-03-221-0/+14
| | | | | | sdisel CSE. llvm-svn: 48673
* Introduce a new node for holding call argumentDuncan Sands2008-03-211-0/+44
| | | | | | | | | | | | | | | | | flags. This is needed by the new legalize types infrastructure which wants to expand the 64 bit constants previously used to hold the flags on 32 bit machines. There are two functional changes: (1) in LowerArguments, if a parameter has the zext attribute set then that is marked in the flags; before it was being ignored; (2) PPC had some bogus code for handling two word arguments when using the ELF 32 ABI, which was hard to convert because of the bogusness. As suggested by the original author (Nicolas Geoffray), I've disabled it for the moment. Tested with "make check" and the Ada ACATS testsuite. llvm-svn: 48640
* More APInt-ification.Dan Gohman2008-03-131-3/+3
| | | | llvm-svn: 48344
* Don't try to extract an i32 from an f64. ThisDuncan Sands2008-03-121-2/+6
| | | | | | | | | | | | getCopyToParts problem was noticed by the new LegalizeTypes infrastructure. In order to avoid this kind of thing in the future I've added a check that EXTRACT_ELEMENT is only used with integers. Once LegalizeTypes is up and running most likely BUILD_PAIR and EXTRACT_ELEMENT can be removed, in favour of using apints instead. llvm-svn: 48294
* Correctly propagate thread-local flag from aliasee to alias. This fixes PR2137Anton Korobeynikov2008-03-111-1/+10
| | | | llvm-svn: 48257
* compile: double test() {}Chris Lattner2008-03-111-1/+3
| | | | | | | | | | | | | | | | | | | | into: _test: fldz ret instead of: _test: subl $12, %esp #IMPLICIT_DEF %xmm0 movsd %xmm0, (%esp) fldl (%esp) addl $12, %esp ret llvm-svn: 48213
* Teach SD some vector identities, allowing us to compile vec_set-9 into:Chris Lattner2008-03-081-1/+13
| | | | | | | | | | | | | | | | | | | | | _test3: movd %rdi, %xmm1 #IMPLICIT_DEF %xmm0 punpcklqdq %xmm1, %xmm0 ret instead of: _test3: #IMPLICIT_DEF %rax movd %rax, %xmm0 movd %rdi, %xmm1 punpcklqdq %xmm1, %xmm0 ret This is still not ideal. There is no reason to two xmm regs. llvm-svn: 48058
* Implement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} ↵Evan Cheng2008-03-081-0/+1
| | | | | | and prefetchnta instructions. llvm-svn: 48042
* 80 col violation.Evan Cheng2008-03-061-2/+4
| | | | llvm-svn: 47998
* Constant fold SIGN_EXTEND_INREG with ashr not lshr.Evan Cheng2008-03-061-1/+1
| | | | llvm-svn: 47992
* Generalize FP constant shrinking optimization to apply to any vtChris Lattner2008-03-051-26/+25
| | | | | | | | except ppc long double. This allows us to shrink constant pool entries for x86 long double constants, which in turn allows us to use flds/fldl instead of fldt. llvm-svn: 47938
* Rename isOperand() to isOperandOf() (and other similar methods). It always ↵Evan Cheng2008-03-041-6/+6
| | | | | | confuses me. llvm-svn: 47872
* More APInt-ification.Dan Gohman2008-03-031-10/+6
| | | | llvm-svn: 47868
* More APInt-ification.Dan Gohman2008-02-291-107/+42
| | | | llvm-svn: 47746
* Convert the last remaining users of the non-APInt form ofDan Gohman2008-02-271-35/+15
| | | | | | | ComputeMaskedBits to use the APInt form, and remove the non-APInt form. llvm-svn: 47654
* Rename PrintableName to Name.Bill Wendling2008-02-261-2/+1
| | | | llvm-svn: 47629
* Change "Name" to "AsmName" in the target register info. Gee, a refactoring toolBill Wendling2008-02-261-1/+2
| | | | | | would have been a Godsend here! llvm-svn: 47625
* Avoid aborting on invalid shift counts.Dan Gohman2008-02-261-4/+18
| | | | llvm-svn: 47612
* Convert MaskedValueIsZero and all its users to use APInt. Also addDan Gohman2008-02-251-6/+9
| | | | | | a SignBitIsZero function to simplify a common use case. llvm-svn: 47561
* Better names as per Evan's requestAndrew Lenharth2008-02-211-9/+10
| | | | llvm-svn: 47435
* Atomic op support. If any gcc test uses __sync builtins, it might start ↵Andrew Lenharth2008-02-211-0/+41
| | | | | | failing on archs that haven't implemented them yet llvm-svn: 47430
* LegalizeTypes support for scalarizing a vector storeDuncan Sands2008-02-201-0/+4
| | | | | | | | | and splitting extract_subvector. This fixes nine "make check" testcases, for example 2008-02-04-ExtractSubvector.ll and (partially) CodeGen/Generic/vector.ll. llvm-svn: 47384
* Use APInt::intersects.Dan Gohman2008-02-201-4/+4
| | | | llvm-svn: 47380
* Update gcc 4.3 warnings fix patch with recent head changesAnton Korobeynikov2008-02-201-5/+8
| | | | llvm-svn: 47368
* Fix an incredibly subtle bug exposed by Ted's change to APInt profiling.Chris Lattner2008-02-201-1/+1
| | | | | | | | AddNodeIDNode does profiling for a ConstantSDNode, but so does SelectionDAG::getConstant. This profiling should be moved to a common static function in ConstantSDNode. llvm-svn: 47359
* - When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should ↵Evan Cheng2008-02-181-0/+21
| | | | | | | | check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type. - X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC. llvm-svn: 47290
* llvm.memory.barrier, and impl for x86 and alphaAndrew Lenharth2008-02-161-0/+1
| | | | llvm-svn: 47204
* Fix a miscompilation from Dan's recent apintification.Chris Lattner2008-02-141-3/+1
| | | | llvm-svn: 47128
* Allow the APInt form of ComputeMaskedBits to operate on i128 types.Dan Gohman2008-02-131-4/+7
| | | | llvm-svn: 47101
* Avoid setting bits that aren't demanded.Dan Gohman2008-02-131-3/+3
| | | | llvm-svn: 47098
* Simplify some logic in ComputeMaskedBits. And change ComputeMaskedBitsDan Gohman2008-02-131-41/+50
| | | | | | to pass the mask APInt by value, not by reference. llvm-svn: 47096
* Convert SelectionDAG::ComputeMaskedBits to use APInt instead of uint64_t.Dan Gohman2008-02-131-86/+116
| | | | | | | Add an overload that supports the uint64_t interface for use by clients that haven't been updated yet. llvm-svn: 47039
* Added "Profile" method to APFloat for use with FoldingSet.Ted Kremenek2008-02-111-3/+3
| | | | | | | | | | Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. llvm-svn: 46957
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-2/+3
| | | | llvm-svn: 46930
* Add truncate and AssertZext result expansion.Duncan Sands2008-02-101-0/+1
| | | | llvm-svn: 46926
* Change ConstantSDNode to store an APInt instead of a uint64_t, andDan Gohman2008-02-081-3/+10
| | | | | | begin adding some methods to use it this way. llvm-svn: 46899
* Avoid needlessly casting away const qualifiers.Dan Gohman2008-02-081-2/+2
| | | | llvm-svn: 46876
* Follow Chris' suggestion; change the PseudoSourceValue accessorsDan Gohman2008-02-071-1/+1
| | | | | | | to return pointers instead of references, since this is always what is needed. llvm-svn: 46857
* Re-apply the memory operand changes, with a fix for the staticDan Gohman2008-02-061-9/+67
| | | | | | | | initializer problem, a minor tweak to the way the DAGISelEmitter finds load/store nodes, and a renaming of the new PseudoSourceValue objects. llvm-svn: 46827
* Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.Evan Cheng2008-02-051-4/+0
| | | | llvm-svn: 46776
* Typo.Evan Cheng2008-02-041-1/+1
| | | | llvm-svn: 46725
* Change the 'global modification' APIs in SelectionDAG to take a newChris Lattner2008-02-031-45/+85
| | | | | | | | | | DAGUpdateListener object pointer instead of just returning a vector of deleted nodes. This makes the interfaces more efficient (no more allocating a vector [at least a malloc], filling it in, then walking it) and more clean. This also allows the client to be notified of nodes that are *changed* but not deleted. llvm-svn: 46677
* Generalize the SDOperand->SDOperand form of Chris Lattner2008-02-031-17/+16
| | | | | | | | | SelectionDAG::ReplaceAllUsesWith to handle replacement of an SDOperand with *any* sdoperand, not just one for a node with a single result. Note that this has a horrible FIXME'd hack in it to work around PR1975. This should be removed when PR1975 is fixed. llvm-svn: 46674
* SDIsel processes llvm.dbg.declare by recording the variable debug ↵Evan Cheng2008-02-021-0/+12
| | | | | | | | | information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc. Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes. For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time. llvm-svn: 46659
* Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and ↵Evan Cheng2008-01-311-67/+9
| | | | | | re-commit. llvm-svn: 46623
* Add an extra operand to LABEL nodes which distinguishes between debug, EH, ↵Evan Cheng2008-01-311-0/+16
| | | | | | or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution. llvm-svn: 46609
OpenPOWER on IntegriCloud