summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Revert r58489. It isn't correct for all cases.Bill Wendling2008-10-311-2/+2
| | | | llvm-svn: 58523
* Add a fixme.Evan Cheng2008-10-311-0/+3
| | | | llvm-svn: 58514
* Add a bunch of libcalls for ppcf128 that were somehowDuncan Sands2008-10-313-38/+249
| | | | | | completely forgotten about when writing LegalizeTypes. llvm-svn: 58508
* Don't skip over all "terminator" instructions when determining where to put theBill Wendling2008-10-311-2/+2
| | | | | | | callee-saved restore code. It could skip over conditional jumps accidentally. Instead, just skip the "return" instructions. llvm-svn: 58489
* Fix PR2986: do not use a potentially illegalDuncan Sands2008-10-301-1/+6
| | | | | | | | | | type for the shift amount type. Add a check that shifts and rotates use the type returned by getShiftAmountTy for the amount. This exposed some problems in CellSPU and PPC, which have already been fixed. llvm-svn: 58455
* Add missing vsetcc expansion for wideningMon P Wang2008-10-301-1/+12
| | | | llvm-svn: 58443
* Add initial support for vector widening. Logic is set to widen for X86.Mon P Wang2008-10-303-29/+876
| | | | | | | One will only see an effect if legalizetype is not active. Will move support to LegalizeType soon. llvm-svn: 58426
* Uniformize capitalization of NodeId.Duncan Sands2008-10-292-12/+12
| | | | llvm-svn: 58386
* Fix PR2977: LegalizeTypes support for expandingDuncan Sands2008-10-294-0/+20
| | | | | | VAARG. llvm-svn: 58379
* Add sanity checking for BUILD_PAIR (I noticed theDuncan Sands2008-10-292-7/+24
| | | | | | | | | other day that PPC custom lowering could create a BUILD_PAIR of two f64 with a result type of... f64! - already fixed). Fix a place that triggers the sanity check. llvm-svn: 58378
* - More pre-split fixes: spill slot live interval computation bug; restore ↵Evan Cheng2008-10-292-39/+94
| | | | | | | | point bug. - If a def is spilt, remember its spill index to allow its reuse. llvm-svn: 58375
* Fix a FIXME: in ReplaceNodeWith, if the new nodeDuncan Sands2008-10-292-87/+108
| | | | | | | | | | | | | | | | | | | | | is morphed by AnalyzeNewNode into a previously processed node, and different result values of that node are remapped to values with different nodes, then we could end up using wrong values here [we were assuming that all results remap to values with the same underlying node]. This seems theoretically possible, but I don't have a testcase. The meat of the patch is in the changes to AnalyzeNewNode/AnalyzeNewValue and ReplaceNodeWith. While there, I changed names like RemapNode to RemapValue, since it really remaps values. To tell the truth, I would be much happier if we were only remapping nodes (it would simplify a bunch of logic, and allow for some cute speedups) but I haven't yet worked out how to do that. llvm-svn: 58372
* Fix 80 column violations.Duncan Sands2008-10-291-2/+2
| | | | llvm-svn: 58371
* Fix 80 column violations.Duncan Sands2008-10-291-5/+10
| | | | llvm-svn: 58370
* - Rewrite code that update register live interval that's split.Evan Cheng2008-10-293-85/+177
| | | | | | | - Create and update spill slot live intervals. - Lots of bug fixes. llvm-svn: 58367
* Take Chris' suggestion and define EnableFastISelVerbose andDan Gohman2008-10-281-8/+3
| | | | | | | EnableFastISelAbort variables for Release mode instead of using ifdefs in the code. llvm-svn: 58350
* Protect the code for fast-isel debugging with #ifndef NDEBUG.Dan Gohman2008-10-281-0/+10
| | | | llvm-svn: 58340
* Fix darwin ppc llvm-gcc build breakage: interceptDuncan Sands2008-10-281-0/+35
| | | | | | | | | | ppcf128 to i32 conversion and expand it into a code sequence like in LegalizeDAG. This needs custom ppc lowering of FP_ROUND_INREG, so turn that on and make it work with LegalizeTypes. Probably PPC should simply custom lower the original conversion. llvm-svn: 58329
* Fix a testcase provided by Bill in which the nodeDuncan Sands2008-10-282-30/+37
| | | | | | | | id could end up being wrong mostly because of forgetting to remap new nodes that morphed into processed nodes through CSE. llvm-svn: 58323
* Don't produce invalid comparisons after legalize.Chris Lattner2008-10-281-2/+4
| | | | llvm-svn: 58320
* fix some whitespace stuffChris Lattner2008-10-281-3/+3
| | | | llvm-svn: 58319
* If def is in the same mbb as the barrier, spilt the value after the last use ↵Evan Cheng2008-10-281-8/+18
| | | | | | before the barrier. llvm-svn: 58314
* Add command line option to limit the number splits to help debugging.Evan Cheng2008-10-281-3/+7
| | | | llvm-svn: 58312
* Avoid putting a split past the end of the live range; always shrink wrap ↵Evan Cheng2008-10-281-11/+20
| | | | | | live interval in the barrier mbb. llvm-svn: 58309
* Silence a bogus compile time warning.Evan Cheng2008-10-271-1/+1
| | | | llvm-svn: 58297
* Remove val# defined by a remat'ed def that is now dead.Evan Cheng2008-10-273-2/+33
| | | | llvm-svn: 58294
* Fix bogus comparison of "const char *" with c-string literal. Use strcmp ↵Ted Kremenek2008-10-271-2/+2
| | | | | | instead. llvm-svn: 58290
* Add setSubgraphColor to color an entire portion of a SelectionDAG. ThisDavid Greene2008-10-271-0/+57
| | | | | | will be used to support debug features in TableGen. llvm-svn: 58257
* Fix PR2634. Create new virtual registers from spills early so that weDavid Greene2008-10-271-8/+19
| | | | | | | can give it the same stack slot as the spilled interval if it is folded. This prevents the fold/unfold code from pointing to the wrong register. llvm-svn: 58255
* Fix UpdateNodeOperands so that it does CSE of callsDuncan Sands2008-10-271-86/+52
| | | | | | | | | (and a bunch of other node types). While there, I added a doNotCSE predicate and used it to reduce code duplication (some of the duplicated code was wrong...). This fixes ARM/cse-libcalls.ll when using LegalizeTypes. llvm-svn: 58249
* Fix a bug in which a node could be added to theDuncan Sands2008-10-271-3/+8
| | | | | | | | | | | | worklist twice: UpdateNodeOperands could morph a new node into a node already on the worklist. We would then recalculate the NodeId for this existing node and add it to the worklist. The testcase is ARM/cse-libcalls.ll, the problem showing up once UpdateNodeOperands is taught to do CSE for calls. llvm-svn: 58246
* Turn on LegalizeTypes, the new type legalizationDuncan Sands2008-10-271-2/+2
| | | | | | | codegen infrastructure, by default. Please report any breakage to the mailing lists. llvm-svn: 58232
* For now, don't split live intervals around x87 stack register barriers. ↵Evan Cheng2008-10-271-0/+2
| | | | | | FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them. llvm-svn: 58230
* Increase default setting of tail-merge-threshold toDale Johannesen2008-10-271-1/+1
| | | | | | 150, based on llvm-test measurements. llvm-svn: 58225
* Do not shrink wrap live interval in a mbb if it's livein any of its ↵Evan Cheng2008-10-261-6/+21
| | | | | | successor blocks. The mbb can be revisited again after all of the successors are processed. llvm-svn: 58184
* Handle cases where there aren't uses in the barrier mbb.Evan Cheng2008-10-251-1/+5
| | | | llvm-svn: 58174
* SDNodes may have at most one Flag result. Update this commentDan Gohman2008-10-251-2/+2
| | | | | | to reflect that. llvm-svn: 58145
* Move the code that adds the DeadMachineInstructionElimPass fromDan Gohman2008-10-251-4/+0
| | | | | | | | | | | | target-independent code to target-specific code. This prevents it from running on targets that aren't using fast-isel. In addition to saving compile time, this addresses the problem that not all targets are prepared for it. In order to use this pass, all instructions must declare all their fixed uses and defs of physical registers. llvm-svn: 58144
* If val# def is ~0U, meaning it's defined by a PHI, and it's previously ↵Evan Cheng2008-10-251-9/+11
| | | | | | split, spill before the barrier because it's impossible to determine if all the defs are spilled in the same spill slot. llvm-svn: 58129
* Fix a pasto.Evan Cheng2008-10-241-1/+1
| | | | llvm-svn: 58102
* Fix a end() dereference; remove an abort() that wasn't meant to be left in.Evan Cheng2008-10-241-5/+4
| | | | llvm-svn: 58072
* Avoid splitting an interval multiple times; avoid splitting ↵Evan Cheng2008-10-242-51/+115
| | | | | | re-materializable val# (for now). llvm-svn: 58068
* Initialize uninitialized variable.Dale Johannesen2008-10-241-1/+1
| | | | llvm-svn: 58057
* Committing a good chunk of the pre-register allocation live interval ↵Evan Cheng2008-10-232-12/+578
| | | | | | splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible. llvm-svn: 58044
* Fix thinko - the operand number has nothing to doDuncan Sands2008-10-232-3/+3
| | | | | | with the result number. llvm-svn: 58041
* LegalizeTypes soft-float support for fpow.Duncan Sands2008-10-222-1/+15
| | | | llvm-svn: 57973
* Be nice to CellSPU: for this target getSetCCResultTypeDuncan Sands2008-10-221-2/+8
| | | | | | | | | | | | may return i8, which can result in SELECT nodes for which the type of the condition is i8, but there are no patterns for select with i8 condition. Tweak the LegalizeTypes logic to avoid this as much as possible. This isn't a real fix because it is still perfectly possible to end up with such select nodes - CellSPU needs to be fixed IMHO. llvm-svn: 57968
* Port from LegalizeDAG the logic to only generateDuncan Sands2008-10-221-8/+44
| | | | | | ADDC/ADDE/SUBC/SUBE if the target supports it. llvm-svn: 57967
* Add some comments explaining the meaning of a booleanDuncan Sands2008-10-221-4/+2
| | | | | | | | that is not of type MVT::i1 in SELECT and SETCC nodes. Relax the LegalizeTypes SELECT condition promotion sanity checks to allow other condition types than i1. llvm-svn: 57966
* Temporarily allow the operands of a BUILD_VECTORDuncan Sands2008-10-221-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | to have a different type to the vector element type. This should be fairly harmless because in the past guys like this were being built all over the place (and were cleaned up when I added this check). The reason for relaxing this check is that it helps LegalizeTypes legalize vector shuffles: the mask is a BUILD_VECTOR that it is *not always possible* to legalize while keeping it a BUILD_VECTOR (vector_shuffle requires the mask to be a BUILD_VECTOR, as opposed to a vector with the right vector type). With this check it is even harder to legalize the mask - turning the check off means that LegalizeTypes manages to legalize almost all vector shuffles encountered in practice. The correct solution is to change vector_shuffle to be a variadic node with the mask built into it as operands. While waiting for that change, this hack stops the problem with vector_shuffle from blocking the turning on of LegalizeTypes. llvm-svn: 57965
OpenPOWER on IntegriCloud