summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use Dan's supperior checkAndrew Lenharth2008-10-071-13/+9
| | | | llvm-svn: 57255
* No need for |=Andrew Lenharth2008-10-071-3/+3
| | | | llvm-svn: 57249
* Use ADDC if it is valid at any smaller size. Do it right this timeAndrew Lenharth2008-10-071-3/+6
| | | | llvm-svn: 57248
* Use ADDC if it is valid at any smaller size. fixes ↵Andrew Lenharth2008-10-071-3/+18
| | | | | | test/Codegen/Generic/i128-addsub.ll on x86 llvm-svn: 57247
* Expand arith on machines without carry flagsAndrew Lenharth2008-10-071-9/+33
| | | | llvm-svn: 57243
* wrap some long lines and expand i32 mul's to libcalls, inspired by aChris Lattner2008-10-041-4/+12
| | | | | | patch by Mikael Lepisto! llvm-svn: 57077
* Pass MemOperand through for 64-bit atomics on 32-bit,Dale Johannesen2008-10-031-5/+18
| | | | | | | incidentally making the case where the memop is a pointer deref work. Fix cmp-and-swap regression. llvm-svn: 57027
* Handle some 64-bit atomics on x86-32, some of the time.Dale Johannesen2008-10-021-11/+16
| | | | llvm-svn: 56963
* Fix typos in comments.Dan Gohman2008-10-011-2/+2
| | | | llvm-svn: 56919
* Optimize SelectionDAG's AssignTopologicalOrder even further.Dan Gohman2008-09-301-5/+4
| | | | | | | | | | | | | | | | | | | Completely eliminate the TopOrder std::vector. Instead, sort the AllNodes list in place. This also eliminates the need to call AllNodes.size(), a linear-time operation, before performing the sort. Also, eliminate the Sources temporary std::vector, since it essentially duplicates the sorted result as it is being built. This also changes the direction of the topological sort from bottom-up to top-down. The AllNodes list starts out in roughly top-down order, so this reduces the amount of reordering needed. Top-down is also more convenient for Legalize, and ISel needed only minor adjustments. llvm-svn: 56867
* Remove misuse of ReplaceNodeResults for atomics withDale Johannesen2008-09-291-3/+0
| | | | | | valid types. No functional change. llvm-svn: 56808
* Add "inreg" field to CallSDNode (doesn't increaseDale Johannesen2008-09-261-3/+3
| | | | | | | | | its size). Adjust various lowering functions to pass this info through from CallInst. Use it to implement sseregparm returns on X86. Remove X86_ssecall calling convention. llvm-svn: 56677
* bug 2812: Segmentation fault on a big emdiam processor.Richard Pennington2008-09-251-1/+1
| | | | llvm-svn: 56609
* Fix the alignment of loads from constant pool entries when theDan Gohman2008-09-221-0/+2
| | | | | | | load address has an offset from the base of the constant pool entry. llvm-svn: 56479
* Change SelectionDAG::getConstantPool to always set the alignment of theDan Gohman2008-09-161-7/+14
| | | | | | | | | | | | | | | | | | | | ConstantPoolSDNode, using the target's preferred alignment for the constant type. In LegalizeDAG, when performing loads from the constant pool, the ConstantPoolSDNode's alignment is used in the calls to getLoad and getExtLoad. This change prevents SelectionDAG::getLoad/getExtLoad from incorrectly choosing the ABI alignment for constant pool loads when Alignment == 0. The incorrect alignment is only a performance issue when ABI alignment does not equal preferred alignment (i.e., on x86 it was generating MOVUPS instead of MOVAPS for v4f32 constant loads when the default ABI alignment for 128bit vectors is forced to 1 byte.) Patch by Paul Redmond! llvm-svn: 56253
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-161-6/+5
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-161-5/+6
| | | | | | | | | | - 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
* Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* andDan Gohman2008-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | ConstantFP* instead of APInt and APFloat directly. This reduces the amount of time to create ConstantSDNode and ConstantFPSDNode nodes when ConstantInt* and ConstantFP* respectively are already available, as is the case in SelectionDAGBuild.cpp. Also, it reduces the amount of time to legalize constants into constant pools, and the amount of time to add ConstantFP operands to MachineInstrs, due to eliminating ConstantInt::get and ConstantFP::get calls. It increases the amount of work needed to create new constants in cases where the client doesn't already have a ConstantInt* or ConstantFP*, such as legalize expanding 64-bit integer constants to 32-bit constants. And it adds a layer of indirection for the accessor methods. But these appear to be outweight by the benefits in most cases. It will also make it easier to make ConstantSDNode and ConstantFPNode more consistent with ConstantInt and ConstantFP. llvm-svn: 56162
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-121-19/+20
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
* The sequence for ppcf128 compares was not IEEEDale Johannesen2008-09-121-4/+6
| | | | | | safe in the presence of NaNs. llvm-svn: 56136
* A few more places where FPOW is being ignored.Evan Cheng2008-09-091-7/+13
| | | | llvm-svn: 56032
* Legalizer was missing code that expand fpow to a libcall.Evan Cheng2008-09-091-10/+12
| | | | llvm-svn: 56028
* Add intrinsics for log, log2, log10, exp, exp2.Dale Johannesen2008-09-041-0/+70
| | | | | | 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-131/+131
| | | | | | Node to reflect semantics llvm-svn: 55504
* Split the ATOMIC NodeType's to include the size, e.g.Dale Johannesen2008-08-281-25/+101
| | | | | | | | | | | | | | | | ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD. Increased the Hardcoded Constant OpActionsCapacity to match. Large but boring; no functional change. This is to support partial-word atomics on ppc; i8 is not a valid type there, so by the time we get to lowering, the ATOMIC_LOAD nodes looks the same whether the type was i8 or i32. The information can be added to the AtomicSDNode, but that is the largest SDNode; I don't fully understand the SDNode allocation, but it is sensitive to the largest node size, so increasing that must be bad. This is the alternative. llvm-svn: 55457
* disallow direct access to SDValue::ResNo, provide a getter insteadGabor Greif2008-08-261-23/+23
| | | | llvm-svn: 55394
* Optimize SelectionDAG's topological sort to use one pass insteadDan Gohman2008-08-261-44/+5
| | | | | | | | of two, and to not need a scratch std::vector. Also, use the SelectionDAG's topological sort in LegalizeDAG instead of having a separate implementation. llvm-svn: 55389
* Add libcalls for the new rounding opcodes.Dan Gohman2008-08-211-0/+55
| | | | llvm-svn: 55133
* Add libm-oriented ISD opcodes for rounding operations.Dan Gohman2008-08-211-0/+5
| | | | llvm-svn: 55130
* Improve support for vector casts in LLVM IR and CodeGen.Dan Gohman2008-08-141-57/+130
| | | | llvm-svn: 54784
* Fix broken CellSPU lowering, re-instate braces in LegalizeNate Begeman2008-07-291-4/+2
| | | | llvm-svn: 54168
* Disable a fix in the previous patch, since it breaks CellSPU.Nate Begeman2008-07-291-2/+4
| | | | | | | The CellSPU codegen is broken, but needs to be fixed before we can put this back in. llvm-svn: 54164
* Add vector shifts to the IR, patch by Eli Friedman.Nate Begeman2008-07-291-3/+16
| | | | | | CodeGen & Clang work coming next. llvm-svn: 54161
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-433/+433
| | | | llvm-svn: 54128
* Tidy SDNode::use_iterator, and complete the transition to have itDan Gohman2008-07-271-4/+2
| | | | | | | parallel its analogue, Value::value_use_iterator. The operator* method now returns the user, rather than the use. llvm-svn: 54127
* When splitting a vector shuffle, fixed which type we used for the hi partMon P Wang2008-07-251-1/+1
| | | | llvm-svn: 54007
* Add titles to the various SelectionDAG viewGraph callsDan Gohman2008-07-211-10/+0
| | | | | | | that include useful information like the name of the block being viewed and the current phase of compilation. llvm-svn: 53872
* Add VerifyNode, a place to put sanity checks onDuncan Sands2008-07-211-3/+4
| | | | | | | | | | | | generic SDNode's (nodes with their own constructors should do sanity checking in the constructor). Add sanity checks for BUILD_VECTOR and fix all the places that were producing bogus BUILD_VECTORs, as found by "make check". My favorite is the BUILD_VECTOR with only two operands that was being used to build a vector with four elements! llvm-svn: 53850
* Factorize some code for determining which libcall to use.Duncan Sands2008-07-171-167/+27
| | | | llvm-svn: 53713
* Fixed potential bug if the source and target of a bit convert have different ↵Mon P Wang2008-07-151-1/+3
| | | | | | alignment llvm-svn: 53590
* Include a frame index in the "fixed stack" pseudo source valueDan Gohman2008-07-111-16/+13
| | | | | | | instead of using the frame index for the SVOffset, which was inconsistent. llvm-svn: 53486
* 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
* Add a mysteriously missing libcall, FPTOSINT_F80_I32.Duncan Sands2008-07-101-0/+4
| | | | | | | Be nice to 16 bit machines by supporting FP_TO_XINT expansion for these. llvm-svn: 53407
* Do not CSE DEBUG_LOC, DBG_LABEL, DBG_STOPPOINT, DECLARE, and EH_LABEL ↵Evan Cheng2008-07-081-26/+36
| | | | | | SDNode's. This improves compile time slightly at -O0 -g. llvm-svn: 53246
* Add explicit keywords.Dan Gohman2008-07-071-2/+1
| | | | llvm-svn: 53179
* Make DenseMap's insert return a pair, to more closely resemble std::map.Dan Gohman2008-07-071-2/+3
| | | | llvm-svn: 53177
* LegalizeSetCCOperands should legalize the result of ExpandLibCall. Patch by ↵Evan Cheng2008-07-071-1/+1
| | | | | | Richard Osborne. llvm-svn: 53169
* Fixed generating incorrect aligned stores that I backout of r53031Mon P Wang2008-07-051-9/+15
| | | | | | | | 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-041-8/+8
| | | | | | | | | | | | 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
* Backed out 53031.Evan Cheng2008-07-031-15/+9
| | | | llvm-svn: 53110
OpenPOWER on IntegriCloud