summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsISelLowering.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] Properly parse registers that appear in inline-asm constraints.Akira Hatanaka2013-08-141-0/+5
| | | | llvm-svn: 188336
* Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector ↵Craig Topper2013-07-141-1/+1
| | | | | | size. llvm-svn: 186274
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-1/+1
| | | | | | specifying the vector size. llvm-svn: 185540
* The getRegForInlineAsmConstraint function should only accept MVT value types.Chad Rosier2013-06-221-1/+1
| | | | llvm-svn: 184642
* Track IR ordering of SelectionDAG nodes 2/4.Andrew Trick2013-05-251-7/+7
| | | | | | | Change SelectionDAG::getXXXNode() interfaces as well as call sites of these functions to pass in SDLoc instead of DebugLoc. llvm-svn: 182703
* Add LLVMContext argument to getSetCCResultTypeMatt Arsenault2013-05-181-1/+1
| | | | llvm-svn: 182180
* [mips] Improve instruction selection for pattern (store (fp_to_sint $src), ↵Akira Hatanaka2013-05-161-0/+4
| | | | | | | | | | | | | | | | | $ptr). Previously, three instructions were needed: trunc.w.s $f0, $f2 mfc1 $4, $f0 sw $4, 0($2) Now we need only two: trunc.w.s $f0, $f2 swc1 $f0, 0($2) llvm-svn: 182053
* [mips] Delete unused enum value.Akira Hatanaka2013-05-161-3/+0
| | | | llvm-svn: 182035
* Checkin in of first of several patches to finish implementation ofReed Kotler2013-05-101-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mips16/mips32 floating point interoperability. This patch fixes returns from mips16 functions so that if the function was in fact called by a mips32 hard float routine, then values that would have been returned in floating point registers are so returned. Mips16 mode has no floating point instructions so there is no way to load values into floating point registers. This is needed when returning float, double, single complex, double complex in the Mips ABI. Helper functions in libc for mips16 are available to do this. For efficiency purposes, these helper functions have a different calling convention from normal Mips calls. Registers v0,v1,a0,a1 are used to pass parameters instead of a0,a1,a2,a3. This is because v0,v1,a0,a1 are the natural registers used to return floating point values in soft float. These values can then be moved to the appropriate floating point registers with no extra cost. The only register that is modified is ra in this call. The helper functions make sure that the return values are in the floating point registers that they would be in if soft float was not in effect (which it is for mips16, though the soft float is implemented using a mips32 library that uses hard float). llvm-svn: 181641
* [mips] Instruction selection patterns for DSP-ASE vector select and compareAkira Hatanaka2013-04-301-0/+4
| | | | | | instructions. llvm-svn: 180820
* Remove unused MEMBARRIER DAG node; it's been replaced by ATOMIC_FENCE.Tim Northover2013-04-201-1/+0
| | | | llvm-svn: 179939
* [mips] Instruction selection patterns for DSP-ASE vector shifts.Akira Hatanaka2013-04-191-0/+5
| | | | llvm-svn: 179906
* [mips] Move MipsTargetLowering::lowerINTRINSIC_W_CHAIN andAkira Hatanaka2013-04-131-2/+0
| | | | | | | | lowerINTRINSIC_WO_CHAIN into MipsSETargetLowering. No functionality changes. llvm-svn: 179444
* [mips] Add mips-specific nodes which will be used to select multiply and divideAkira Hatanaka2013-03-301-0/+12
| | | | | | instructions. llvm-svn: 178394
* [mips] Define two subclasses of MipsTargetLowering. Mips16TargetLowering is forAkira Hatanaka2013-03-131-40/+35
| | | | | | | | mips16 and MipsSETargetLowering is for mips32/64. No functionality changes. llvm-svn: 176917
* [mips] Rename function and variable names to start with proper case. Fix typos.Akira Hatanaka2013-03-121-40/+40
| | | | | | Delete commented-out code. llvm-svn: 176844
* [mips] Custom-legalize BR_JT.Akira Hatanaka2013-03-061-0/+1
| | | | | | In N64-static, GOT address is needed to compute the branch address. llvm-svn: 176580
* [mips] Fix MipsTargetLowering::LowerCallResult and LowerReturn to correctlyAkira Hatanaka2013-03-051-1/+14
| | | | | | handle fp128 returns. llvm-svn: 176523
* [mips] Fix MipsTargetLowering::LowerCall to pass fp128 arguments in floatingAkira Hatanaka2013-03-051-1/+3
| | | | | | point registers. llvm-svn: 176521
* [mips] Correct handling of fp128 (long double) formals and read long doubleAkira Hatanaka2013-03-051-1/+11
| | | | | | parameters from floating point registers if target is mips64 hard float. llvm-svn: 176520
* Fix PR10475Michael Liao2013-03-011-1/+1
| | | | | | | | | | | | | | - ISD::SHL/SRL/SRA must have either both scalar or both vector operands but TLI.getShiftAmountTy() so far only return scalar type. As a result, backend logic assuming that breaks. - Rename the original TLI.getShiftAmountTy() to TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to return target-specificed scalar type or the same vector type as the 1st operand. - Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar type. llvm-svn: 176364
* Make pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.Reed Kotler2013-02-251-0/+7
| | | | llvm-svn: 176007
* Make psuedo FEXT_T8I816_ins into a custom emitter.Reed Kotler2013-02-241-0/+3
| | | | llvm-svn: 176002
* Make psuedo FEXT_T8I816_ins a custom inserter. It should be expandedReed Kotler2013-02-241-0/+3
| | | | | | as early as possible; which means during instruction selection. llvm-svn: 175984
* Expand pseudos/macros for Selt. This is the last of the complexReed Kotler2013-02-231-0/+3
| | | | | | macros.The rest is some small misc. stuff. llvm-svn: 175950
* Fix a nomenclature mistake. Slt->Slti in the functions. The "i" refersReed Kotler2013-02-221-1/+1
| | | | | | to the immediate operand of sli or cmp function. llvm-svn: 175865
* Expand mips16 SelT form pseudso/macros.Reed Kotler2013-02-221-0/+3
| | | | llvm-svn: 175862
* Expand the sel pseudo/macro. This generates basic blocks where previouslyReed Kotler2013-02-211-0/+3
| | | | | | | there were inline br .+4 instructions. Soon everything can enjoy the full instruction scheduling experience. llvm-svn: 175718
* [mips] Clean up class MipsCCInfo.Akira Hatanaka2013-02-151-22/+26
| | | | | | No functionality change intended. llvm-svn: 175310
* [mips] Lower EH_RETURN.Akira Hatanaka2013-01-301-0/+3
| | | | | | Patch by Sasa Stankovic. llvm-svn: 173862
* Make some code a little simpler.Reed Kotler2013-01-281-0/+2
| | | | llvm-svn: 173649
* The next phase of Mips16 hard float implementation.Reed Kotler2013-01-241-0/+7
| | | | | | | | | | | | | | | | Allow Mips16 routines to call Mips32 routines that have abi requirements that either arguments or return values are passed in floating point registers. This handles only the pic case. We have not done non pic for Mips16 yet in any form. The libm functions are Mips32, so with this addition we have a complete Mips16 hard float implementation. We still are not able to complete mix Mip16 and Mips32 with hard float. That will be the next phase which will have several steps. For Mips32 to freely call Mips16 some stub functions must be created. llvm-svn: 173320
* [mips] Clean up code in MipsTargetLowering::LowerCall. No functional changeAkira Hatanaka2013-01-221-1/+2
| | | | | | intended llvm-svn: 173189
* This code implements most of mips16 hardfloat as it is done by gcc.Reed Kotler2012-12-151-0/+2
| | | | | | | | | | | | | | | | In this case, essentially it is soft float with different library routines. The next step will be to make this fully interoperational with mips32 floating point and that requires creating stubs for functions with signatures that contain floating point types. I have a more sophisticated design for mips16 hardfloat which I hope to implement at a later time that directly does floating point without the need for function calls. The mips16 encoding has no floating point instructions so one needs to switch to mips32 mode to execute floating point instructions. llvm-svn: 170259
* Sorry about the churn. One more change to getOptimalMemOpType() hook. Did IEvan Cheng2012-12-121-1/+2
| | | | | | | | | | | | mention the inline memcpy / memset expansion code is a mess? This patch split the ZeroOrLdSrc argument into two: IsMemset and ZeroMemset. The first indicates whether it is expanding a memset or a memcpy / memmove. The later is whether the memset is a memset of zero. It's totally possible (likely even) that targets may want to do different things for memcpy and memset of zero. llvm-svn: 169959
* - Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.Evan Cheng2012-12-121-1/+1
| | | | | | | | | Also added more comments to explain why it is generally ok to return true. - Rename getOptimalMemOpType argument IsZeroVal to ZeroOrLdSrc. It's meant to be true for loaded source (memcpy) or zero constants (memset). The poor name choice is probably some kind of legacy issue. llvm-svn: 169954
* Some enhancements for memcpy / memset inline expansion.Evan Cheng2012-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | 1. Teach it to use overlapping unaligned load / store to copy / set the trailing bytes. e.g. On 86, use two pairs of movups / movaps for 17 - 31 byte copies. 2. Use f64 for memcpy / memset on targets where i64 is not legal but f64 is. e.g. x86 and ARM. 3. When memcpy from a constant string, do *not* replace the load with a constant if it's not possible to materialize an integer immediate with a single instruction (required a new target hook: TLI.isIntImmLegal()). 4. Use unaligned load / stores more aggressively if target hooks indicates they are "fast". 5. Update ARM target hooks to use unaligned load / stores. e.g. vld1.8 / vst1.8. Also increase the threshold to something reasonable (8 for memset, 4 pairs for memcpy). This significantly improves Dhrystone, up to 50% on ARM iOS devices. rdar://12760078 llvm-svn: 169791
* Initial implementation of MipsTargetLowering::isLegalAddressingMode.Akira Hatanaka2012-11-171-0/+2
| | | | llvm-svn: 168230
* [mips] Custom-lower ISD::FRAME_TO_ARGS_OFFSET node.Akira Hatanaka2012-11-071-0/+1
| | | | | | Patch by Sasa Stankovic. llvm-svn: 167548
* [mips] Allow tail-call optimization for vararg functions and functions whichAkira Hatanaka2012-10-301-2/+3
| | | | | | use the caller's stack. llvm-svn: 167048
* Add definition of function MipsTargetLowering::passArgOnStack which emits nodesAkira Hatanaka2012-10-301-0/+4
| | | | | | for passing a function call argument on a stack. llvm-svn: 167041
* [mips] Do not tail-call optimize vararg functions or functions with byvalAkira Hatanaka2012-10-271-1/+2
| | | | | | | | arguments. This is rather conservative and should be fixed later to be more aggressive. llvm-svn: 166851
* Add method MipsTargetLowering::writeVarArgRegs which copies argument registersAkira Hatanaka2012-10-271-0/+6
| | | | | | of vararg functions back to the stack. llvm-svn: 166844
* Add method MipsTargetLowering::passByValArg.Akira Hatanaka2012-10-271-0/+8
| | | | | | | | This method emits nodes for passing byval arguments in registers and stack. This has the same functionality as existing functions PassByValArg64 and WriteByValArg which will be deleted later. llvm-svn: 166843
* Add method MipsTargetLowering::copyByValRegs.Akira Hatanaka2012-10-271-0/+10
| | | | | | | | This method copies byval arguments passed in registers onto the stack and has the same functionality as existing functions CopyMips64ByValRegs and ReadByValArg which will be deleted later. llvm-svn: 166841
* Add class MipsCC which provides methods used to analyze formal and callAkira Hatanaka2012-10-261-0/+64
| | | | | | arguments and inquire about calling convention information. llvm-svn: 166840
* [mips] Add code to do tail call optimization.Akira Hatanaka2012-10-191-0/+5
| | | | | | | Currently, it is enabled only if option "enable-mips-tail-calls" is given and all of the callee's arguments are passed in registers. llvm-svn: 166342
* Add node and enum for mips tail call.Akira Hatanaka2012-10-191-0/+3
| | | | llvm-svn: 166318
* Implement MipsTargetLowering::CanLowerReturn.Akira Hatanaka2012-10-101-0/+6
| | | | | | Patch by Sasa Stankovic. llvm-svn: 165585
* MIPS DSP: Branch on Greater Than or Equal To Value 32 in DSPControl Pos ↵Akira Hatanaka2012-09-271-0/+2
| | | | | | Field instruction. llvm-svn: 164751
OpenPOWER on IntegriCloud