summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo compounded by a cut-and-pasto.Duncan Sands2008-07-021-4/+4
| | | | llvm-svn: 53012
* Let AnalyzeNewNode take care of calling ExpungeNode.Duncan Sands2008-07-022-86/+79
| | | | | | | This makes sure that all new nodes are expunged, not just those the top node of a new subtree. llvm-svn: 53011
* - Use a faster priority comparison function if -fast.Evan Cheng2008-07-022-228/+304
| | | | | | - Code clean up. llvm-svn: 53010
* No need to use std::distance. We can just count the number of operandsOwen Anderson2008-07-011-1/+4
| | | | | | much more cheaply. llvm-svn: 52990
* Eliminate a compile time warning.Evan Cheng2008-07-011-1/+1
| | | | llvm-svn: 52982
* Do run ComputeLiveOutVRegInfo with -fast.Evan Cheng2008-07-011-1/+1
| | | | llvm-svn: 52975
* Do not use computationally expensive scheduling heuristics with -fast.Evan Cheng2008-07-013-50/+59
| | | | llvm-svn: 52971
* Apply Chris' suggestion.Evan Cheng2008-07-011-32/+36
| | | | llvm-svn: 52970
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-015-40/+54
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Suppress compiler warning.Evan Cheng2008-06-301-1/+1
| | | | llvm-svn: 52934
* Use a simpler but equivalent form of RecordSource.Dan Gohman2008-06-301-2/+1
| | | | llvm-svn: 52931
* Add timing report for various sub-passes under SelectionDAGISel.Evan Cheng2008-06-301-0/+26
| | | | llvm-svn: 52930
* Use reserve.Dan Gohman2008-06-301-0/+1
| | | | | | | | | | SelectionDAG::allnodes_size is linear, but that doesn't appear to outweigh the benefit of reducing heap traffic. If it does become a problem, we should teach SelectionDAG to keep a count of how many nodes are live, because there are several other places where that information would be useful as well. llvm-svn: 52926
* Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect itsDan Gohman2008-06-304-44/+47
| | | | | | | | | | | | | | | | | purpose, and give it a custom SDNode subclass so that it doesn't need to have line number, column number, filename string, and directory string, all existing as individual SDNodes to be the operands. This was the only user of ISD::STRING, StringSDNode, etc., so remove those and some associated code. This makes stop-points considerably easier to read in -view-legalize-dags output, and reduces overhead (creating new nodes and copying std::strings into them) on code containing debugging information. llvm-svn: 52924
* Split scheduling from instruction selection.Evan Cheng2008-06-301-3/+11
| | | | llvm-svn: 52923
* Replace some std::vectors that showed up in heap profiling withDan Gohman2008-06-301-10/+9
| | | | | | | | SmallVectors. Change the signature of TargetLowering::LowerArguments to avoid returning a vector by value, and update the two targets which still use this directly, Sparc and IA64, accordingly. llvm-svn: 52917
* Correct the allocation size for CCState's UsedRegs member, whichDan Gohman2008-06-301-1/+1
| | | | | | | | only needs one bit for each register. UsedRegs is a SmallVector sized at 16, so this eliminates a heap allocation/free for every call and return processed by Legalize on most targets. llvm-svn: 52915
* ExpungeNode is only needed for new nodes! ThisDuncan Sands2008-06-301-9/+12
| | | | | | | fixes CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll when using the new LegalizeTypes infrastructure. llvm-svn: 52903
* Support for VAARG. As noted in a comment, this isDuncan Sands2008-06-302-0/+33
| | | | | | | wrong for types like x86 long double and i1, but no worse than what is done in LegalizeDAG. llvm-svn: 52898
* Support for promoting select_cc operands.Duncan Sands2008-06-302-3/+16
| | | | llvm-svn: 52895
* Revert the SelectionDAG optimization that makesDuncan Sands2008-06-303-40/+27
| | | | | | | | | | | | | | | | | | it impossible to create a MERGE_VALUES node with only one result: sometimes it is useful to be able to create a node with only one result out of one of the results of a node with more than one result, for example because the new node will eventually be used to replace a one-result node using ReplaceAllUsesWith, cf X86TargetLowering::ExpandFP_TO_SINT. On the other hand, most users of MERGE_VALUES don't need this and for them the optimization was valuable. So add a new utility method getMergeValues for creating MERGE_VALUES nodes which by default performs the optimization. Change almost everywhere to use getMergeValues (and tidy some stuff up at the same time). llvm-svn: 52893
* - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an ↵Evan Cheng2008-06-301-29/+34
| | | | | | | | empty string for ConstantAggregateZero case which surprises selectiondag. - Correctly handle memcpy from constant string which is zero-initialized. llvm-svn: 52891
* Implement split and scalarize for SELECT_CC, fixing PR2504Chris Lattner2008-06-301-0/+23
| | | | llvm-svn: 52887
* Revert (52748 and friends):Anton Korobeynikov2008-06-291-7/+13
| | | | | | | | | | | | Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
* Really fix the bootstrap failure.Chris Lattner2008-06-281-9/+5
| | | | llvm-svn: 52854
* Add back the capability to include nul characters in strings with Chris Lattner2008-06-281-1/+1
| | | | | | | GetConstantStringInfo. This will hopefully restore llvm-gcc to happy bootstrap land. llvm-svn: 52851
* When folding a bitcast into a load or store, preserve the alignmentDan Gohman2008-06-281-2/+2
| | | | | | | information of the original load or store, which is checked to be at least as good, and possibly better. llvm-svn: 52849
* simplify this check, GetConstantStringInfo validates that aChris Lattner2008-06-271-5/+3
| | | | | | global is constant already. No functionality change. llvm-svn: 52812
* Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean upBill Wendling2008-06-271-0/+1
| | | | | | some uses of std::vector, where it's return std::vector by value. Yuck! llvm-svn: 52800
* duncan points out that isOperationLegal includes a check forChris Lattner2008-06-261-2/+2
| | | | | | type legality. Thanks Duncan! llvm-svn: 52786
* Move GetConstantStringInfo to lib/Analysis. RemoveEric Christopher2008-06-261-2/+2
| | | | | | | | | string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. llvm-svn: 52748
* when we know the signbit of an input to uint_to_fp is zero,Chris Lattner2008-06-261-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | change it to sint_to_fp on targets where that is cheaper (and visaversa of course). This allows us to compile uint_to_fp to: _test: movl 4(%esp), %eax shrl $23, %eax cvtsi2ss %eax, %xmm0 movl 8(%esp), %eax movss %xmm0, (%eax) ret instead of: .align 3 LCPI1_0: ## double .long 0 ## double least significant word 4.5036e+15 .long 1127219200 ## double most significant word 4.5036e+15 .text .align 4,0x90 .globl _test _test: subl $12, %esp movl 16(%esp), %eax shrl $23, %eax movl %eax, (%esp) movl $1127219200, 4(%esp) movsd (%esp), %xmm0 subsd LCPI1_0, %xmm0 cvtsd2ss %xmm0, %xmm0 movl 20(%esp), %eax movss %xmm0, (%eax) addl $12, %esp ret llvm-svn: 52747
* - Fix a x86 vector isel bug: illegal transformation of a vector_shuffle into aEvan Cheng2008-06-251-11/+11
| | | | | | | | shift. - Add a readme entry for a missing vector_shuffle optimization that results in awful codegen. llvm-svn: 52740
* Add support for expanding PPC 128 bit floats.Duncan Sands2008-06-254-9/+215
| | | | | | | | | | | | | | | | | | | | For this it is convenient to permit floats to be used with EXTRACT_ELEMENT, so I tweaked things to allow that. I also added libcalls for ppcf128 to i32 forms of FP_TO_XINT, since they exist in libgcc and this case can certainly occur (and does occur in the testsuite) - before the i64 libcall was being used. Also, the XINT_TO_FP result seemed to be wrong when the argument is an i128: the wrong fudge factor was added (the i32 and i64 cases were handled directly, but the i128 code fell through to some generic softening code which seemed to think it was i64 to f32!). So I fixed it by adding a fudge factor that I found in my breakfast cereal. llvm-svn: 52739
* Add/complete support for integer and floatDuncan Sands2008-06-253-38/+282
| | | | | | | | select_cc and friends. This code could be factorized a bit but I'm not sure that it's worth it. llvm-svn: 52724
* Remove the OrigVT member from AtomicSDNode, as it is redundant withDan Gohman2008-06-253-13/+9
| | | | | | the base SDNode's VTList. llvm-svn: 52722
* Added MemOperands to Atomic operations since Atomics touches memory.Mon P Wang2008-06-253-34/+93
| | | | | | | | Added abstract class MemSDNode for any Node that have an associated MemOperand Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and atomic.lss => atomic.load.sub llvm-svn: 52706
* Use the new PriorityQueue in ScheduleDAGList too, which alsoDan Gohman2008-06-231-19/+3
| | | | | | needs arbitrary-element removal. llvm-svn: 52654
* Move a DenseMap's declaration outside of a loop, and just callDan Gohman2008-06-231-1/+2
| | | | | | | clear() on each iteration. This avoids allocating and deallocating all of DenseMap's memory on each iteration. llvm-svn: 52642
* Duncan pointed out this code could be tidied.Dan Gohman2008-06-231-6/+3
| | | | llvm-svn: 52624
* Port some integer multiplication fixes from LegalizeDAG.Duncan Sands2008-06-231-8/+24
| | | | | | | Bail out with an error if there is no libcall available for the given size of integer. llvm-svn: 52622
* Support for expanding the result of EXTRACT_ELEMENT.Duncan Sands2008-06-234-7/+24
| | | | llvm-svn: 52621
* Cleanup up LegalizeTypes handling of loads andDuncan Sands2008-06-235-24/+22
| | | | | | stores. llvm-svn: 52620
* Make custom lowering of ADD work correctly. ThisDuncan Sands2008-06-221-3/+3
| | | | | | | | | | fixes PR2476; patch by Richard Osborne. The same problem exists for a bunch of other operators, but I'm ignoring this because they will be automagically fixed when the new LegalizeTypes infrastructure lands, since it already solves this problem centrally. llvm-svn: 52610
* Simplify some getNode calls.Dan Gohman2008-06-211-6/+3
| | | | llvm-svn: 52604
* canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;Dan Gohman2008-06-211-3/+2
| | | | | | check this with an assert. llvm-svn: 52603
* Use clear() to zero an existing APInt.Dan Gohman2008-06-211-1/+1
| | | | llvm-svn: 52601
* Remove a redundant return.Dan Gohman2008-06-211-2/+0
| | | | llvm-svn: 52585
* Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeIdDan Gohman2008-06-214-50/+38
| | | | | | | field, which is otherwise unused after instruction selection, as an index into the SUnit array. llvm-svn: 52583
* Add a priority queue class, which is a wrapper around std::priority_queueDan Gohman2008-06-212-11/+8
| | | | | | | and provides fairly efficient removal of arbitrary elements. Switch ScheduleDAGRRList from std::set to this new priority queue. llvm-svn: 52582
OpenPOWER on IntegriCloud