summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix darwin ppc llvm-gcc build breakage: interceptDuncan Sands2008-10-281-5/+7
| | | | | | | | | | 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
* Disable constant-offset folding for PowerPC, as the PowerPC targetDan Gohman2008-10-211-0/+6
| | | | | | isn't yet prepared for it. llvm-svn: 57886
* 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-7/+5
| | | | | | | parameters instead of raw Constants. This prevents the constants from being selected by the isel pass, fixing PR2735. llvm-svn: 57385
* Rename ConstantSDNode's getSignExtended to getSExtValue, forDan Gohman2008-09-261-1/+1
| | | | | | | consistancy with ConstantInt, and re-implement it in terms of ConstantInt's getSExtValue. llvm-svn: 56700
* Add "inreg" field to CallSDNode (doesn't increaseDale Johannesen2008-09-261-1/+1
| | | | | | | | | 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
* Properly handle 'm' inline asm constraints. If a GV is being selected for ↵Evan Cheng2008-09-241-2/+5
| | | | | | the addressing mode, it requires the same logic for PIC relative addressing, etc. llvm-svn: 56526
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+0
| | | | llvm-svn: 56513
* Make log, log2, log10, exp, exp2 use Expand byDale Johannesen2008-09-221-10/+0
| | | | | | default. llvm-svn: 56471
* Add trampoline support to PPC. GCC simply calls the "__trampoline_setup"Bill Wendling2008-09-171-7/+49
| | | | | | function with appropriate parameters. This allows us to support blocks on PPC. llvm-svn: 56267
* Reverting r56249. On further investigation, this functionality isn't needed.Bill Wendling2008-09-161-8/+7
| | | | | | Apologies for the thrashing. llvm-svn: 56251
* - Change "ExternalSymbolSDNode" to "SymbolSDNode".Bill Wendling2008-09-161-7/+8
| | | | | | | | | | - 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-33/+30
| | | | | | | | | | | | | 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-41/+43
| | | | | | | with ConstantInt. This led to fixing a bug in TargetLowering.cpp using getValue instead of getAPIntValue. llvm-svn: 56159
* Succumb utterly to compatibility and implementDale Johannesen2008-09-111-4/+4
| | | | | | | __sync_fetch_and_nand as ANDC, even though that's not what nand means. llvm-svn: 56087
* Add intrinsics for log, log2, log10, exp, exp2.Dale Johannesen2008-09-041-0/+15
| | | | | | No functional change (and no FE change to generate them). llvm-svn: 55753
* Fix some bugs in the code sequences for atomics.Dale Johannesen2008-09-021-10/+10
| | | | llvm-svn: 55643
* fix a bunch of 80-col violationsGabor Greif2008-08-311-3/+6
| | | | llvm-svn: 55588
* Expand for ROTR with MVT::i64.Bill Wendling2008-08-311-0/+1
| | | | | | Dale, Could you please review this? llvm-svn: 55581
* Add ppc partial-word ATOMIC_CMP_SWAP.Dale Johannesen2008-08-301-4/+143
| | | | llvm-svn: 55554
* Add partial word version of ATOMIC_SWAP.Dale Johannesen2008-08-291-50/+29
| | | | llvm-svn: 55546
* erect abstraction boundaries for accessing SDValue members, rename Val -> ↵Gabor Greif2008-08-281-72/+72
| | | | | | Node to reflect semantics llvm-svn: 55504
* In lowering SELECT_CC, removed cases where we can't flip the true and false ↵Mon P Wang2008-08-281-8/+0
| | | | | | when the compare value has a NaN llvm-svn: 55499
* Implement partial-word binary atomics on ppc.Dale Johannesen2008-08-281-0/+150
| | | | llvm-svn: 55478
* disallow direct access to SDValue::ResNo, provide a getter insteadGabor Greif2008-08-261-2/+2
| | | | llvm-svn: 55394
* Implement 32 & 64 bit versions of PPC atomicDale Johannesen2008-08-251-47/+78
| | | | | | binary primitives. llvm-svn: 55343
* Remove PPC-specific lowering for atomics; theDale Johannesen2008-08-251-63/+0
| | | | | | | | generic stuff works fine. Mark rewritten cmp-and-swap as not using CR1. llvm-svn: 55336
* It's important for the cmp-and-swap to balanceDale Johannesen2008-08-251-13/+31
| | | | | | | loads and stores but it's even more important for it to store the right value.:( llvm-svn: 55319
* Implement __sync_synchronize on ppc32. Patch by Gary Benson.Dale Johannesen2008-08-221-3/+0
| | | | llvm-svn: 55186
* Rewrite ppc code generated for __sync_{bool|val}_compare_and_swapDale Johannesen2008-08-221-5/+5
| | | | | | | so that lwarx and stwcx are always executed the same number of times. This is important for performance, I'm told. llvm-svn: 55163
* Implement ISD::TRAP support on PPCNate Begeman2008-08-111-1/+4
| | | | llvm-svn: 54644
* Add a flag to disable jump table generation (allDale Johannesen2008-07-311-1/+1
| | | | | | | | switches use the binary search algorithm) for environments that don't support it. PPC64 JIT is such an environment; turn the flag on for that. llvm-svn: 54248
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-373/+373
| | | | llvm-svn: 54128
* Tidy SDNode::use_iterator, and complete the transition to have itDan Gohman2008-07-271-6/+6
| | | | | | | parallel its analogue, Value::value_use_iterator. The operator* method now returns the user, rather than the use. llvm-svn: 54127
* Fix a catastrophic PPC64 ABI bug: i32 operands which are passed in memory ↵Evan Cheng2008-07-241-0/+1
| | | | | | (all of the parameter registers are used) are loaded from sp offsets that were off by 4. llvm-svn: 53979
* Add VerifyNode, a place to put sanity checks onDuncan Sands2008-07-211-3/+3
| | | | | | | | | | | | 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
* Make sure custom lowering for LegalizeTypesDuncan Sands2008-07-191-4/+10
| | | | | | | | | | returns a node with the right number of return values. This fixes codegen of Generic/cast-fp.ll, Generic/fp_to_int.ll and PowerPC/multiple-return-values.ll when using -march=ppc32 -mattr=+64bit. llvm-svn: 53794
* Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!Evan Cheng2008-07-121-167/+245
| | | | llvm-svn: 53505
* Include a frame index in the "fixed stack" pseudo source valueDan Gohman2008-07-111-6/+6
| | | | | | | instead of using the frame index for the SVOffset, which was inconsistent. llvm-svn: 53486
* Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)Chris Lattner2008-07-101-1/+0
| | | | llvm-svn: 53411
* Fix an altivec constant miscompilation that Duncan found throughChris Lattner2008-07-101-2/+4
| | | | | | his work on legalizetypes. llvm-svn: 53410
* 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
* Rather than having a different custom legalizationDuncan Sands2008-07-041-1/+1
| | | | | | | | | | | | 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
* Add a new getMergeValues method that does not needDuncan Sands2008-07-021-6/+6
| | | | | | | | | | 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
OpenPOWER on IntegriCloud