summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove more non-DebugLoc getNode variants. UseDale Johannesen2009-02-061-3/+3
| | | | | | | | getCALLSEQ_{END,START} to permit passing no DebugLoc there. UNDEF doesn't logically have DebugLoc; add getUNDEF to encapsulate this. llvm-svn: 63978
* Remove more non-DebugLoc versions of getNode.Dale Johannesen2009-02-061-6/+10
| | | | llvm-svn: 63969
* Remove a non-DebugLoc version of getNode.Dale Johannesen2009-02-051-6/+8
| | | | llvm-svn: 63889
* Remove non-DebugLoc forms of CopyToReg and CopyFromReg.Dale Johannesen2009-02-041-8/+11
| | | | | | Adjust callers. llvm-svn: 63789
* Remove non-DebugLoc versions of getLoad and getStore.Dale Johannesen2009-02-041-23/+29
| | | | | | Adjust the many callers of those versions. llvm-svn: 63767
* Remove non-DebugLoc forms of the exotic formsDale Johannesen2009-02-041-22/+22
| | | | | | of Lod and Sto; patch uses. llvm-svn: 63716
* Make LowerCallTo and LowerArguments take a DebugLocDale Johannesen2009-01-301-1/+2
| | | | | | argument. Adjust all callers and overloaded versions. llvm-svn: 63444
* Don't make use of an illegal type (i64) whenDuncan Sands2008-12-121-5/+31
| | | | | | lowering f64 function arguments. llvm-svn: 60944
* There are no longer any places that require aDuncan Sands2008-12-011-2/+2
| | | | | | | | MERGE_VALUES node with only one operand, so get rid of special code that only existed to handle that possibility. llvm-svn: 60349
* Teach DAGCombine to fold constant offsets into GlobalAddress nodes,Dan Gohman2008-10-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | and add a TargetLowering hook for it to use to determine when this is legal (i.e. not in PIC mode, etc.) This allows instruction selection to emit folded constant offsets in more cases, such as the included testcase, eliminating the need for explicit arithmetic instructions. This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp that attempted to achieve the same effect, but wasn't as effective. Also, fix handling of offsets in GlobalAddressSDNodes in several places, including changing GlobalAddressSDNode's offset from int to int64_t. The Mips, Alpha, Sparc, and CellSPU targets appear to be unaware of GlobalAddress offsets currently, so set the hook to false on those targets. llvm-svn: 57748
* Rename LoadX to LoadExt.Evan Cheng2008-10-141-2/+2
| | | | llvm-svn: 57526
* Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's asChris Lattner2008-10-111-4/+3
| | | | | | | parameters instead of raw Constants. This prevents the constants from being selected by the isel pass, fixing PR2735. llvm-svn: 57385
* Use expand for smul_lohi for nowAnton Korobeynikov2008-10-101-0/+1
| | | | llvm-svn: 57362
* Add rudimentary support for 'r' register operandAnton Korobeynikov2008-10-101-0/+52
| | | | llvm-svn: 57359
* CleanupAnton Korobeynikov2008-10-101-83/+82
| | | | llvm-svn: 57358
* Make log, log2, log10, exp, exp2 use Expand byDale Johannesen2008-09-221-10/+0
| | | | | | default. llvm-svn: 56471
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-161-3/+3
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-161-3/+3
| | | | | | | | | | - Add linkage to SymbolSDNode (default to external). - Change ISD::ExternalSymbol to ISD::Symbol. - Change ISD::TargetExternalSymbol to ISD::TargetSymbol These changes pave the way to allowing SymbolSDNodes with non-external linkage. llvm-svn: 56249
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-131-11/+12
| | | | | | | | | | | | | Currently it just holds the calling convention and flags for isVarArgs and isTailCall. And it has several utility methods, which eliminate magic 5+2*i and similar index computations in several places. CallSDNodes are not CSE'd. Teach UpdateNodeOperands to handle nodes that are not CSE'd gracefully. llvm-svn: 56183
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-121-6/+7
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
* Add intrinsics for log, log2, log10, exp, exp2.Dale Johannesen2008-09-041-0/+10
| | | | | | No functional change (and no FE change to generate them). llvm-svn: 55753
* erect abstraction boundaries for accessing SDValue members, rename Val -> ↵Gabor Greif2008-08-281-8/+8
| | | | | | Node to reflect semantics llvm-svn: 55504
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-84/+84
| | | | llvm-svn: 54128
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-7/+7
| | | | | | | | | | | 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
* Add a new getMergeValues method that does not needDuncan Sands2008-07-021-3/+3
| | | | | | | | | | 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
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-2/+4
| | | | | | | | | | | | | | | | 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
* Rename ISD::LOCATION to ISD::DBG_STOPPOINT to better reflect itsDan Gohman2008-06-301-2/+2
| | | | | | | | | | | | | | | | | 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
* Replace some std::vectors that showed up in heap profiling withDan Gohman2008-06-301-5/+3
| | | | | | | | 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
* Revert the SelectionDAG optimization that makesDuncan Sands2008-06-301-8/+4
| | | | | | | | | | | | | | | | | | 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
* Use MachineBasicBlock::transferSuccessors.Dan Gohman2008-06-211-8/+3
| | | | llvm-svn: 52594
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-12/+12
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
* Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not LegalDan Gohman2008-04-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
* Check in some #ifdef'd out code switching call argument Chris Lattner2008-03-171-42/+103
| | | | | | | | lowering over to SparcCallingConv.td. We can't make the switch yet because we can't say to pass f64 registers in 2 x i32 registers with the td file yet. llvm-svn: 48449
* remove dead codeChris Lattner2008-03-171-32/+0
| | | | llvm-svn: 48445
* Switch sparc from using LowerCallTo to using LowerOperation(CALL) like Chris Lattner2008-03-171-66/+47
| | | | | | | other targets. Use autogenerated calling conv to lower result of calls. llvm-svn: 48444
* Start moving sparc to use SparcCallingConv.td, switching overChris Lattner2008-03-171-266/+265
| | | | | | | return lowering first. This fixes a bug where the top and bottom of i64 values were returned in the wrong registers before. llvm-svn: 48443
* split sparc lowering out into SparcISelLowering.{cpp|h} to followChris Lattner2008-03-171-0/+948
best practices. llvm-svn: 48442
OpenPOWER on IntegriCloud