summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-13/+13
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-11/+11
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-8/+10
| | | | llvm-svn: 75153
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-3/+6
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Refactor ABI code in the PowerPC backend.Tilmann Scheller2009-07-031-443/+248
| | | | | | | | | | | Make CalculateParameterAndLinkageAreaSize() Darwin-specific. Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin(). Rename MachoABI to DarwinABI for consistency. Rename ELF ABI to SVR4 ABI for consistency. Factor out common call return lowering between the Darwin and SVR4 ABI. Factor out common call lowering between the Darwin and SVR4 ABI. llvm-svn: 74766
* Implement the SVR4 ABI for PowerPC.Tilmann Scheller2009-07-031-28/+687
| | | | | | | | | | | | | | | | | | | | | | | | Implement LowerFORMAL_ARGUMENTS_SVR4(). Implement LowerCALL_SVR4(). Add support for split arguments. Implement by value parameter passing for aggregates. Add support for variable argument lists. Create the spill area for argument registers of variable argument functions no longer at a fixed offset. Make sure callee saved registers are spilled to the correct stack offsets. Change allocation order of non-volatile floating-point registers. Add VRSAVE to the list of callee-saved registers, add CallConvLowering for vararg calls. Add support for variable argument calls with Vector arguments. Add support for VR and VRSAVE save area, improve allocation order for non-volatile vector registers. Stop creating illegal i8 values in LowerVASTART(). Add memory access width hints. Make sure to reserve space on the stack for the frame pointer. When using the SVR4 ABI, reserve r13 for the Small Data Area pointer. Assure that the frame pointer is spilled to the correct location on the stack. Some FP registers were not marked as volatile. Make sure the i64 words from a long double are passed either both in registers or both on the stack. Only put integer arguments in registers which are not marked with the inreg flag. llvm-svn: 74765
* Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed ↵Tilmann Scheller2009-07-031-1/+1
| | | | | | | | | | | arguments in a vararg call. With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack. The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list. llvm-svn: 74764
* Small cleanups in the PowerPC backend.Tilmann Scheller2009-07-031-34/+21
| | | | | | | | | | Small refactoring in LowerFORMAL_ARGUMENTS(). Correct minor formatting issues. Remove size argument of CreateCopyOfByValArgument(). Remove dead argument from CalculateStackSlotSize(). Remove unused variable ReturnAddrIndex from various targets. llvm-svn: 74763
* Update comments to make it clear that the function alignment is the Log2 of theBill Wendling2009-07-011-1/+1
| | | | | | bytes and not bytes. llvm-svn: 74624
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-301-1/+7
| | | | | | | | | | have the alignment be calculated up front, and have the back-ends obey whatever alignment is decided upon. This allows for future work that would allow for precise no-op placement and the like. llvm-svn: 74564
* Fix FP_TO_UINT->i32 on ppc32 -mcpu=g5. This wasDale Johannesen2009-06-041-9/+11
| | | | | | | | | | | | | | using Promote which won't work because i64 isn't a legal type. It's easy enough to use Custom, but then we have the problem that when the type legalizer is promoting FP_TO_UINT->i16, it has no way of telling it should prefer FP_TO_SINT->i32 to FP_TO_UINT->i32. I have uncomfortably hacked this by making the type legalizer choose FP_TO_SINT when both are Custom. This fixes several regressions in the testsuite. llvm-svn: 72891
* Return the operand rather than a null SDValue when the given SELECT_CC Eli Friedman2009-05-281-3/+3
| | | | | | is actually legal. Part of LegalizeDAG cleanups. llvm-svn: 72513
* Ger rid of some dead code.Eli Friedman2009-05-271-3/+0
| | | | llvm-svn: 72494
* Make the PPC backend use a legal type for the operands to the BUILD_VECTOREli Friedman2009-05-241-5/+3
| | | | | | nodes it generates. llvm-svn: 72356
* Don't #include DerivedTypes.h from TargetData.h.Jay Foad2009-05-111-0/+1
| | | | llvm-svn: 71468
* 2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.Nate Begeman2009-04-271-108/+103
| | | | | | | | | | | | | | PR2957 ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. llvm-svn: 70225
* Revert 69952. Causes testsuite failures on linux x86-64.Rafael Espindola2009-04-241-106/+108
| | | | llvm-svn: 69967
* PR2957Nate Begeman2009-04-241-108/+106
| | | | | | | | | | | | | | ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next. llvm-svn: 69952
* Use early exit to reduce indentation. No functional change.Bob Wilson2009-03-031-128/+128
| | | | llvm-svn: 65962
* Generalize BuildVectorSDNode::isConstantSplat to use APInts and handleBob Wilson2009-03-021-8/+11
| | | | | | | | arbitrary vector sizes. Add an optional MinSplatBits parameter to specify a minimum for the splat element size. Update the PPC target to use the revised interface. llvm-svn: 65899
* Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a newBob Wilson2009-03-011-106/+5
| | | | | | method in a BuildVectorSDNode "pseudo-class". llvm-svn: 65747
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-251-15/+110
| | | | llvm-svn: 65482
* Remove all "cached" data from BuildVectorSDNode, preferring to retrieveScott Michel2009-02-251-6/+6
| | | | | | | | | results via reference parameters. This patch also appears to fix Evan's reported problem supplied as a reduced bugpoint test case. llvm-svn: 65426
* Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTORScott Michel2009-02-221-109/+14
| | | | | | | | | 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. llvm-svn: 65296
* Remove trailing whitespace to reduce later commit patch noise.Scott Michel2009-02-171-344/+344
| | | | | | | | (Note: Eventually, commits like this will be handled via a pre-commit hook that does this automagically, as well as expand tabs to spaces and look for 80-col violations.) llvm-svn: 64827
* Remove refs to non-DebugLoc version of BuildMI from PowerPC.Dale Johannesen2009-02-131-55/+64
| | | | llvm-svn: 64431
* Use getDebugLoc forwarder instead of getNode()->getDebugLoc.Dale Johannesen2009-02-071-10/+10
| | | | | | No functional change. llvm-svn: 64026
* Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowingDan Gohman2009-02-071-3/+3
| | | | | | ScheduleDAG's TLI member to use const. llvm-svn: 64018
* Get rid of the last non-DebugLoc versions of getNode!Dale Johannesen2009-02-071-3/+6
| | | | | | | | | | | | Many targets build placeholder nodes for special operands, e.g. GlobalBaseReg on X86 and PPC for the PIC base. There's no sensible way to associate debug info with these. I've left them built with getNode calls with explicit DebugLoc::getUnknownLoc operands. I'm not too happy about this but don't see a good improvement; I considered adding a getPseudoOperand or something, but it seems to me that'll just make it harder to read. llvm-svn: 63992
* Remove more non-DebugLoc getNode variants. UseDale Johannesen2009-02-061-9/+2
| | | | | | | | 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-30/+37
| | | | llvm-svn: 63969
* Eliminate remaining non-DebugLoc version of getTargetNode.Dale Johannesen2009-02-061-3/+6
| | | | llvm-svn: 63951
* Get rid of one more non-DebugLoc getNode andDale Johannesen2009-02-061-80/+86
| | | | | | | its corresponding getTargetNode. Lots of caller changes. llvm-svn: 63904
* Remove a non-DebugLoc version of getNode.Dale Johannesen2009-02-051-34/+41
| | | | llvm-svn: 63889
* Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.Dale Johannesen2009-02-051-20/+22
| | | | llvm-svn: 63800
* Remove non-DebugLoc forms of CopyToReg and CopyFromReg.Dale Johannesen2009-02-041-6/+9
| | | | | | Adjust callers. llvm-svn: 63789
* Remove non-DebugLoc versions of getLoad and getStore.Dale Johannesen2009-02-041-65/+80
| | | | | | Adjust the many callers of those versions. llvm-svn: 63767
* Remove non-DebugLoc forms of the exotic formsDale Johannesen2009-02-041-51/+54
| | | | | | of Lod and Sto; patch uses. llvm-svn: 63716
* Remove some more non-DebugLoc versions of constructionDale Johannesen2009-02-041-14/+16
| | | | | | functions, with callers adjusted to fit. llvm-svn: 63705
* Remove a few non-DebugLoc versions of node creationDale Johannesen2009-02-041-5/+6
| | | | | | functions. llvm-svn: 63703
* Make LowerCallTo and LowerArguments take a DebugLocDale Johannesen2009-01-301-1/+2
| | | | | | argument. Adjust all callers and overloaded versions. llvm-svn: 63444
* Fix PPC ISD::Declare isel and eliminate the need for ↵Evan Cheng2009-01-161-4/+1
| | | | | | PPCTargetLowering::LowerGlobalAddress to check if isVerifiedDebugInfoDesc() is true. Given the recent changes, it would falsely return true for a lot of GlobalAddressSDNode's. llvm-svn: 62373
* Const-qualify getPreIndexedAddressParts and friends.Dan Gohman2009-01-151-5/+6
| | | | llvm-svn: 62259
* Fix PR3274: when promoting the condition of a BRCOND node,Duncan Sands2009-01-011-1/+1
| | | | | | | | | | promote from i1 all the way up to the canonical SetCC type. In order to discover an appropriate type to use, pass MVT::Other to getSetCCResultType. In order to be able to do this, change getSetCCResultType to take a type as an argument, not a value (this is also more logical). llvm-svn: 61542
* There are no longer any places that require aDuncan Sands2008-12-011-5/+5
| | | | | | | | MERGE_VALUES node with only one operand, so get rid of special code that only existed to handle that possibility. llvm-svn: 60349
* Change the interface to the type legalization methodDuncan Sands2008-12-011-69/+65
| | | | | | | | | | | ReplaceNodeResults: rather than returning a node which must have the same number of results as the original node (which means mucking around with MERGE_VALUES, and which is also easy to get wrong since SelectionDAG folding may mean you don't get the node you expect), return the results in a vector. llvm-svn: 60348
* If the type legalizer actually legalized anythingDuncan Sands2008-11-241-2/+2
| | | | | | | | | | | | | (this doesn't happen that often, since most code does not use illegal types) then follow it by a DAG combiner run that is allowed to generate illegal operations but not illegal types. I didn't modify the target combiner code to distinguish like this between illegal operations and illegal types, so it will not produce illegal operations as well as not producing illegal types. llvm-svn: 59960
* Rename SetCCResultContents to BooleanContents. InDuncan Sands2008-11-231-1/+1
| | | | | | | practice these booleans are mostly produced by SetCC, however the concept is more general. llvm-svn: 59911
* Make FP tests requiring two compares work on PPC (PR 642).Dale Johannesen2008-11-071-0/+14
| | | | | | | | | | This is Chris' patch from the PR, modified to realize that SETUGT/SETULT occur legitimately with integers, plus two fixes in LegalizeDAG to pass a valid result type into LegalizeSetCC. The argument of TLI.getSetCCResultType is ignored on PPC, but I think I'm following usage elsewhere. llvm-svn: 58871
* Shift amounts should have type getShiftAmountTyDuncan Sands2008-10-301-9/+9
| | | | | | | (i32 for PPC, not i8). Correct this, and some formatting while there. llvm-svn: 58451
OpenPOWER on IntegriCloud