aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.Wesley Peck2010-11-231-22/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119990 91177308-0d34-0410-b5e6-96231b3b80d8
* update a bunch of code to use the MachinePointerInfo version of getStore.Chris Lattner2010-09-211-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114461 91177308-0d34-0410-b5e6-96231b3b80d8
* continue MachinePointerInfo'izing, eliminating use of one of the oldChris Lattner2010-09-211-8/+8
| | | | | | | getLoad overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114443 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix va_arg for doubles. With this patch VAARG nodes always contain theRafael Espindola2010-07-111-5/+2
| | | | | | | | | | | | | | | correct alignment information, which simplifies ExpandRes_VAARG a bit. The patch introduces a new alignment information to TargetLoweringInfo. This is needed since the two natural candidates cannot be used: * The 's' in target data: If this is set to the minimal alignment of any argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for example. * The getTransientStackAlignment method. It is possible for an architecture to have argument less aligned than what we maintain the stack pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108072 91177308-0d34-0410-b5e6-96231b3b80d8
* When splitting a VAARG, remember its alignment.Rafael Espindola2010-06-261-2/+7
| | | | | | This produces terrible but correct code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106952 91177308-0d34-0410-b5e6-96231b3b80d8
* More 80 violations.Evan Cheng2010-04-151-6/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8
* Add non-temporal flags and remove an assumption of default arguments.David Greene2010-02-151-7/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96240 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead variable.Bill Wendling2009-12-281-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92178 91177308-0d34-0410-b5e6-96231b3b80d8
* -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixedEvan Cheng2009-10-181-1/+2
| | | | | | | | | | | | stack slots and giving them different PseudoSourceValue's did not fix the problem of post-alloc scheduling miscompiling llvm itself. - Apply Dan's conservative workaround by assuming any non fixed stack slots can alias other memory locations. This means a load from spill slot #1 cannot move above a store of spill slot #2. - Enable post-alloc scheduling for x86 at optimization leverl Default and above. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84424 91177308-0d34-0410-b5e6-96231b3b80d8
* Only fixed stack objects and spill slots should be get FixedStack ↵Evan Cheng2009-10-181-2/+1
| | | | | | PseudoSourceValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84411 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 84315 for now. Re-thinking the patch.Evan Cheng2009-10-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84321 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getFixedStack to getStackObject. The stack objects represented are notEvan Cheng2009-10-171-1/+1
| | | | | | | necessarily fixed. Only those will negative frame indices are "fixed." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col violation.Evan Cheng2009-10-171-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84311 91177308-0d34-0410-b5e6-96231b3b80d8
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-14/+14
| | | | | | infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-2/+2
| | | | | | | | | while the latter is capable of representing either a primitive or an extended type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-26/+26
| | | | | | own struct type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
* Nowadays vectors are only split if they have an evenDuncan Sands2009-07-081-10/+8
| | | | | | | | | number of elements. Make some simplifications based on this (in particular SplitVecRes_SETCC). Tighten up some checking while there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75050 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace. Reorder some methodsDuncan Sands2009-07-081-1/+1
| | | | | | | and cases alphabetically. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75001 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup; fixes review comments for a previous patch. Sorry for Eli Friedman2009-06-191-4/+3
| | | | | | | | taking so long to get to this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73757 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak the expansion code for BIT_CONVERT to generate better code Eli Friedman2009-06-071-0/+20
| | | | | | | | converting from an MMX vector to an i64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73024 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the code to grab the low and high parts of a valueDan Gohman2009-04-251-6/+1
| | | | | | | using EXTRACT_ELEMENT into a utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70056 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to make BUILD_VECTOR operands have the sameDuncan Sands2009-04-181-0/+2
| | | | | | | | | | | | | | | | | | type as the vector element type: allow them to be of a wider integer type than the element type all the way through the system, and not just as far as LegalizeDAG. This should be safe because it used to be this way (the old type legalizer would produce such nodes), so backends should be able to handle it. In fact only targets which have legal vector types with an illegal promoted element type will ever see this (eg: <4 x i16> on ppc). This fixes a regression with the new type legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR the same as BUILD_VECTOR. After all, it is just a special case of BUILD_VECTOR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69467 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SelectionDAG type legalization to allow BUILD_VECTOR operands to beBob Wilson2009-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | promoted to legal types without changing the type of the vector. This is following a suggestion from Duncan (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html). The transformation that used to be done during type legalization is now postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized and potentially handled specially by target-specific code. It turns out that this is also consistent with an optimization done by the DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by replacing one of the BUILD_VECTOR operands with the newly inserted element; but INSERT_VECTOR_ELT allows its scalar operand to be larger than the element type, with any extra high bits being implicitly truncated. The result is a BUILD_VECTOR where one of the operands has a type larger the the vector element type. Any code that operates on BUILD_VECTORs may now need to be aware of the potential type discrepancy between the vector element type and the BUILD_VECTOR operands. This patch updates all of the places that I could find to handle that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68996 91177308-0d34-0410-b5e6-96231b3b80d8
* Added missing support for widening when splitting an unary op (PR3683)Mon P Wang2009-03-181-0/+15
| | | | | | | | and expanding a bit convert (PR3711). In both cases, we extract the valid part of the widen vector and then do the conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67175 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-251-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65482 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTORScott Michel2009-02-221-5/+4
| | | | | | | | | | instruction. The class also consolidates the code for detecting constant splats that's shared across PowerPC and the CellSPU backends (and might be useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for generating new BUILD_VECTOR nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65296 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63978 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more non-DebugLoc versions of getNode.Dale Johannesen2009-02-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63969 91177308-0d34-0410-b5e6-96231b3b80d8
* Fill in more omissions in DebugLog propagation.Dale Johannesen2009-02-041-2/+3
| | | | | | | | I think that's it for this directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63690 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing spaces.Duncan Sands2009-02-021-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63540 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugLoc propagation. Done with file.Dale Johannesen2009-01-311-45/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63486 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve SourceValue information when lowering produces multiple loads fromDan Gohman2008-12-161-3/+6
| | | | | | | different offsets within the same stack slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61093 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to LegalizeType for expanding the operands of scalar to vectorMon P Wang2008-12-151-0/+43
| | | | | | | | and insert vector element. Modified extract vector element to extend the result to match the expected promoted type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61029 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3117: not all nodes being legalized. TheDuncan Sands2008-12-091-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | essential problem was that the DAG can contain random unused nodes which were never analyzed. When remapping a value of a node being processed, such a node may become used and need to be analyzed; however due to operands being transformed during analysis the node may morph into a different one. Users of the morphing node need to be updated, and this wasn't happening. While there I added a bunch of documentation and sanity checks, so I (or some other poor soul) won't have to scratch their head over this stuff so long trying to remember how it was all supposed to work next time some obscure problem pops up! The extra sanity checking exposed a few places where invariants weren't being preserved, so those are fixed too. Since some of the sanity checking is expensive, I added a flag to turn it on. It is also turned on when building with ENABLE_EXPENSIVE_CHECKS=1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60797 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak some comments.Duncan Sands2008-11-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58993 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2977: LegalizeTypes support for expandingDuncan Sands2008-10-291-0/+17
| | | | | | | VAARG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58379 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConstantSDNode::getValue to getZExtValue, for consistencyDan Gohman2008-09-121-2/+3
| | | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56159 91177308-0d34-0410-b5e6-96231b3b80d8
* erect abstraction boundaries for accessing SDValue members, rename Val -> ↵Gabor Greif2008-08-281-1/+1
| | | | | | Node to reflect semantics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55504 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-43/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54128 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PromoteIntRes_FP_ROUND - not sure what itDuncan Sands2008-07-101-0/+1
| | | | | | | | was doing there: FP_ROUND returns a float, not an integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53405 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the LegalizeType method naming scheme more regular.Duncan Sands2008-07-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53403 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for expanding the result of EXTRACT_ELEMENT.Duncan Sands2008-06-231-6/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52621 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup up LegalizeTypes handling of loads andDuncan Sands2008-06-231-8/+6
| | | | | | | stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52620 91177308-0d34-0410-b5e6-96231b3b80d8
* Share some code that is common between integer andDuncan Sands2008-06-201-0/+318
float expansion (and sometimes vector splitting too). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52548 91177308-0d34-0410-b5e6-96231b3b80d8