summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
Commit message (Collapse)AuthorAgeFilesLines
* Fix an obsolete top-level comment.Dan Gohman2008-07-111-3/+2
| | | | llvm-svn: 53481
* Factor out debugging code into the common base class.Dan Gohman2008-07-113-8/+5
| | | | llvm-svn: 53480
* Add support for putting NamedRegionTimers in TimerGroups, andDan Gohman2008-07-113-22/+33
| | | | | | | | use a timer group for the timers in SelectionDAGISel. Also, Split scheduling out from emitting, to give each their own timer. llvm-svn: 53476
* Trim unnecessary #includes.Dan Gohman2008-07-111-1/+0
| | | | llvm-svn: 53471
* Remove an apparently useless routine: there shouldDuncan Sands2008-07-112-15/+0
| | | | | | | be no need to split the result of a vector RET node, since they are always already legal. llvm-svn: 53462
* It is pointless to turn a UINT_TO_FP into anDuncan Sands2008-07-113-79/+118
| | | | | | | | | SINT_TO_FP libcall plus additional operations: it might as well be a direct UINT_TO_FP libcall. So only turn it into an SINT_TO_FP if the target has special handling for SINT_TO_FP. llvm-svn: 53461
* Add two missing SINT_TO_FP libcalls.Duncan Sands2008-07-112-11/+21
| | | | llvm-svn: 53460
* Port a shift-by-1 optimization from LegalizeDAG: itDuncan Sands2008-07-111-0/+7
| | | | | | | was presumably added after the rest of the code was copied to LegalizeTypes. llvm-svn: 53459
* Add support for 128 bit shifts and 32 bit shiftsDuncan Sands2008-07-112-6/+23
| | | | | | on 16 bit machines. llvm-svn: 53458
* Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticedChris Lattner2008-07-101-2/+5
| | | | | | | when working on legalizetypes. Both legalizetypes and legalizeops now produce hte same code for CodeGen/ARM/fcopysign.ll. llvm-svn: 53435
* make legalize types be a command line option: -enable-legalize-types.Chris Lattner2008-07-101-5/+8
| | | | llvm-svn: 53434
* Add support for 128 bit multiplicative operations.Duncan Sands2008-07-102-21/+62
| | | | | | | | | Lack of these caused a bootstrap failure with Fortran on x86-64 with LegalizeTypes turned on. While there, be nice to 16 bit machines and support expansion of i32 too. llvm-svn: 53408
* Add a mysteriously missing libcall, FPTOSINT_F80_I32.Duncan Sands2008-07-104-6/+32
| | | | | | | Be nice to 16 bit machines by supporting FP_TO_XINT expansion for these. llvm-svn: 53407
* Fix a FIXME: use an apint in CTTZ legalization.Duncan Sands2008-07-101-3/+3
| | | | llvm-svn: 53406
* Remove PromoteIntRes_FP_ROUND - not sure what itDuncan Sands2008-07-104-14/+1
| | | | | | | was doing there: FP_ROUND returns a float, not an integer. llvm-svn: 53405
* Make sure the alignment of the temporary createdDuncan Sands2008-07-101-2/+6
| | | | | | | in CreateStackStoreLoad is good enough for both the source and destination types. llvm-svn: 53404
* Make the LegalizeType method naming scheme more regular.Duncan Sands2008-07-105-49/+43
| | | | llvm-svn: 53403
* Don't barf when dumping a constant that containsDuncan Sands2008-07-101-1/+1
| | | | | | a ginormous value (eg: i128 -1). llvm-svn: 53402
* Simplify hasNUsesOfValue and hasAnyUsesOfValue even more. ThisDan Gohman2008-07-091-14/+2
| | | | | | | | | | | makes their special-case checks of use_size() less beneficial, so remove them. This eliminates all but one use of use_size(), which is in AssignTopologicalOrder, which uses it only once for each node, and so can reasonably afford to recompute it, as this allows the UsesSize field of SDNode to be removed altogether. llvm-svn: 53377
* hasAnyUseOfValue can check SDUse nodes of its users directly insteadDan Gohman2008-07-091-13/+3
| | | | | | of examining every operand of every user. llvm-svn: 53374
* Move MemoryVT out of LSBaseNode into MemSDNode, allowing theDan Gohman2008-07-091-28/+16
| | | | | | | getMemOperand function to be moved into the base class as well and made non-virtual. llvm-svn: 53372
* Move the IsVolatile and SVOffset fields into the MemSDNode baseDan Gohman2008-07-091-0/+11
| | | | | | | | | | class, and store IsVolatile and Alignment in a more compact form. This makes AtomicSDNode slightly larger, but it shrinks LoadSDNode and StoreSDNode, which are much more common and are the largest of the SDNode subclasses. Also, this lets the isVolatile() and getAlignment() accessors be non-virtual. llvm-svn: 53361
* Remove some unneeded includes.Duncan Sands2008-07-092-4/+0
| | | | llvm-svn: 53289
* Redo LegalizeTypes soft float support forDuncan Sands2008-07-092-96/+103
| | | | | | | | | SINT_TO_FP and UINT_TO_FP. This now produces the same code as LegalizeDAG (the previous code was based on a mistaken idea of what LegalizeDAG did in this case). llvm-svn: 53288
* Forgot to update the chain result when softeningDuncan Sands2008-07-091-12/+21
| | | | | | loads. llvm-svn: 53287
* LegalizeTypes soft float support for FP_TO_SINT andDuncan Sands2008-07-092-4/+134
| | | | | | FP_TO_UINT. llvm-svn: 53286
* LegalizeTypes support for powi soft float.Duncan Sands2008-07-092-3/+16
| | | | llvm-svn: 53285
* Make the role of MVT::i32 clearer here, and add aDuncan Sands2008-07-091-3/+4
| | | | | | note since it is not clear whether it is correct. llvm-svn: 53284
* Missed alignment argument on stores lowered from memcpy.Evan Cheng2008-07-091-1/+1
| | | | llvm-svn: 53281
* const-ify SelectionDAG::getNodeValueTypes.Dan Gohman2008-07-091-2/+2
| | | | llvm-svn: 53264
* Factor out the code for computing an alignment value, and make itDan Gohman2008-07-081-38/+32
| | | | | | | available to getAtomic in addition to just getLoad and getStore, to prevent MachineMemOperands with 0 alignment. llvm-svn: 53261
* Do not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL ↵Evan Cheng2008-07-082-45/+74
| | | | | | SDNode's. This improves compile time slightly at -O0 -g. llvm-svn: 53246
* Remove custom expansion from LegalizeTypes when doingDuncan Sands2008-07-084-42/+40
| | | | | | | | | soft float: experiments show that targets aren't expecting this for results or for operands. Add support select/select_cc result soft float and correct operand soft float for these. llvm-svn: 53245
* Add missing select_cc libcall line, somehow omittedDuncan Sands2008-07-081-0/+1
| | | | | | in LegalizeTypes. llvm-svn: 53244
* LegalizeTypes support for FP_ROUND and FP_EXTENDDuncan Sands2008-07-082-2/+46
| | | | | | soft float. llvm-svn: 53231
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-6/+6
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* Pool-allocation for SDNodes. The pool is allocated once for each function,Dan Gohman2008-07-072-88/+153
| | | | | | | | | and reused across SelectionDAGs. This drastically reduces the number of calls to malloc/free made during instruction selection, and improves memory locality. llvm-svn: 53211
* Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) toDan Gohman2008-07-071-43/+50
| | | | | | | properly track dead nodes that are on the original SDNode's operand list but not the new one, and have no other uses. llvm-svn: 53201
* Remove most of the uses of SDOperandPtr, usually replacing it with aDan Gohman2008-07-071-38/+69
| | | | | | | | | | | | | | simple const SDOperand*, which is what's usually needed. For AddNodeIDOperands, which is small, just duplicate the function to accept an SDUse*. For SelectionDAG::getNode - Add an overload that accepts SDUse* that copies the operands into a temporary SDOperand array, but also has special-case checks for 0 through 3 operands to avoid the copy in the common cases. llvm-svn: 53183
* Add explicit keywords.Dan Gohman2008-07-072-3/+2
| | | | llvm-svn: 53179
* Make DenseMap's insert return a pair, to more closely resemble std::map.Dan Gohman2008-07-072-9/+14
| | | | llvm-svn: 53177
* LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by ↵Evan Cheng2008-07-071-1/+1
| | | | | | Richard Osborne. llvm-svn: 53169
* LegalizeTypes soft-float support for stores of aDuncan Sands2008-07-072-0/+20
| | | | | | float value. llvm-svn: 53165
* Fixed generating incorrect aligned stores that I backout of r53031Mon P Wang2008-07-052-12/+19
| | | | | | | | that fixed problems in EmitStackConvert where the source and target type have different alignment by creating a stack slot with the max alignment of source and target type. llvm-svn: 53150
* Rather than having a different custom legalizationDuncan Sands2008-07-045-107/+72
| | | | | | | | | | | | hook for each way in which a result type can be legalized (promotion, expansion, softening etc), just use one: ReplaceNodeResults, which returns a node with exactly the same result types as the node passed to it, but presumably with a bunch of custom code behind the scenes. No change if the new LegalizeTypes infrastructure is not turned on. llvm-svn: 53137
* Revert my previous check-in that split up MachineModuleInfo. It turns out toBill Wendling2008-07-032-2/+1
| | | | | | slow the compiler down at -O0 some 30% or more. Ooops. llvm-svn: 53120
* Backed out 53031.Evan Cheng2008-07-032-19/+12
| | | | llvm-svn: 53110
* Avoid unnecessarily copying APInt objects.Dan Gohman2008-07-031-3/+3
| | | | llvm-svn: 53065
* Replace a few uses of SelectionDAG::getTargetNode withDan Gohman2008-07-022-110/+46
| | | | | | | | | | | | SelectionDAG::SelectNodeTo in the instruction selector. This updates existing nodes in place instead of creating new ones. Go back to selecting ISD::DBG_LABEL nodes into TargetInstrInfo::DBG_LABEL nodes instead of leaving them unselected, now that SelectNodeTo allows us to update them in place. llvm-svn: 53057
* Add a new getMergeValues method that does not needDuncan Sands2008-07-023-32/+27
| | | | | | | | | | to be passed the list of value types, and use this where appropriate. Inappropriate places are where the value type list is already known and may be long, in which case the existing method is more efficient. llvm-svn: 53035
OpenPOWER on IntegriCloud