summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsISelLowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mips] Clean up class MipsCCInfo.Akira Hatanaka2013-02-151-36/+48
| | | | | | No functionality change intended. llvm-svn: 175310
* [mips] Do not use function CC_MipsN_VarArg unless the function being analyzedAkira Hatanaka2013-02-051-1/+1
| | | | | | | | | | | is a vararg function. The original code was examining flag OutputArg::IsFixed to determine whether CC_MipsN_VarArg or CC_MipsN should be called. This is not correct, since this flag is often set to false when the function being analyzed is a non-variadic function. llvm-svn: 174442
* Move MRI liveouts to Mips return instructions.Jakob Stoklund Olesen2013-02-051-15/+10
| | | | llvm-svn: 174410
* [mips] Lower EH_RETURN.Akira Hatanaka2013-01-301-0/+32
| | | | | | Patch by Sasa Stankovic. llvm-svn: 173862
* Teach SDISel to combine fsin / fcos into a fsincos node if the followingEvan Cheng2013-01-291-0/+2
| | | | | | | | | | | | | | | | | | conditions are met: 1. They share the same operand and are in the same BB. 2. Both outputs are used. 3. The target has a native instruction that maps to ISD::FSINCOS node or the target provides a sincos library call. Implemented the generic optimization in sdisel and enabled it for Mac OSX. Also added an additional optimization for x86_64 Mac OSX by using an alternative entry point __sincos_stret which returns the two results in xmm0 / xmm1. rdar://13087969 PR13204 llvm-svn: 173755
* Remove addToNoHelperNeeded function that was left unused after r173649. ↵Craig Topper2013-01-281-6/+0
| | | | | | Fixes a -Wunused warning. llvm-svn: 173664
* Make some code a little simpler.Reed Kotler2013-01-281-40/+38
| | | | llvm-svn: 173649
* fix use of std::std. it's ordered set.Reed Kotler2013-01-261-3/+3
| | | | llvm-svn: 173563
* MipsISelLowering.cpp: Fill unreachable paths to fix warnings. ↵NAKAMURA Takumi2013-01-241-0/+6
| | | | | | | | [-Wsometimes-uninitialized] FIXME: Could they, unreachable(s), be removed? FIXME: I could prefer the coding standards... llvm-svn: 173325
* MipsISelLowering.cpp: Fix a warning, take two. [-Wunused-variable]NAKAMURA Takumi2013-01-241-2/+2
| | | | | | ...and fix a typo, s/#ifdef/#ifndef/ llvm-svn: 173324
* MipsISelLowering.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2013-01-241-3/+5
| | | | llvm-svn: 173323
* The next phase of Mips16 hard float implementation.Reed Kotler2013-01-241-36/+239
| | | | | | | | | | | | | | | | 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-20/+12
| | | | | | intended llvm-svn: 173189
* [mips] MipsTargetLowering::getSetCCResultType should return a vector type ifAkira Hatanaka2013-01-041-1/+3
| | | | | | vectors are being compared. llvm-svn: 171517
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-5/+5
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* set register class properly for mips16 hereReed Kotler2012-12-201-1/+2
| | | | llvm-svn: 170669
* This assert is overly restrictive and does not work for mips16.Reed Kotler2012-12-201-1/+0
| | | | llvm-svn: 170667
* This code implements most of mips16 hardfloat as it is done by gcc.Reed Kotler2012-12-151-0/+44
| | | | | | | | | | | | | | | | 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
* Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.Patrik Hagglund2012-12-131-3/+3
| | | | | | | | | | | | Accordingly, add helper funtions getSimpleValueType (in parallel to getValueType) in SDValue, SDNode, and TargetLowering. This is the first, in a series of patches. This is the second attempt. In the first attempt (r169837), a few getSimpleVT() were hoisted too far, detected by bootstrap failures. llvm-svn: 170104
* [mips] Do not copy GOT address to register $gp if the function being called hasAkira Hatanaka2012-12-131-4/+9
| | | | | | internal linkage. llvm-svn: 170092
* 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
* Revert EVT->MVT changes, r169836-169851, due to buildbot failures.Patrik Hagglund2012-12-111-3/+3
| | | | llvm-svn: 169854
* Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.Patrik Hagglund2012-12-111-3/+3
| | | | | | | | | Accordingly, add helper funtions getSimpleValueType (in parallel to getValueType) in SDValue, SDNode, and TargetLowering. This is the first, in a series of patches. llvm-svn: 169837
* Some enhancements for memcpy / memset inline expansion.Evan Cheng2012-12-101-1/+4
| | | | | | | | | | | | | | | | | | | | | 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
* [mips] Delete nodes and instructions for dynamic alloca that are no longer inAkira Hatanaka2012-12-071-1/+0
| | | | | | use. llvm-svn: 169580
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-8/+8
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* [mips] Generate big GOT code.Akira Hatanaka2012-11-211-3/+13
| | | | llvm-svn: 168460
* [mips] Simplify lowering functions in MipsISelLowering.cpp by using the helperAkira Hatanaka2012-11-211-148/+32
| | | | | | functions added in r168456. llvm-svn: 168458
* [mips] Add helper functions that create nodes for computing address.Akira Hatanaka2012-11-211-0/+65
| | | | llvm-svn: 168456
* [mips] Add command line option "-mxgot".Akira Hatanaka2012-11-211-0/+4
| | | | llvm-svn: 168455
* [mips] When a node which loads from a GOT is created, pass a MachinePointerInfoAkira Hatanaka2012-11-211-4/+6
| | | | | | referring to a GOT entry. llvm-svn: 168453
* Initial implementation of MipsTargetLowering::isLegalAddressingMode.Akira Hatanaka2012-11-171-0/+20
| | | | llvm-svn: 168230
* [mips] Custom-lower ISD::FRAME_TO_ARGS_OFFSET node.Akira Hatanaka2012-11-071-0/+26
| | | | | | Patch by Sasa Stankovic. llvm-svn: 167548
* Delete MipsFunctionInfo::NextStackOffset. No functionality change intended. Akira Hatanaka2012-11-071-3/+2
| | | | llvm-svn: 167546
* [mips] Add member field MipsFunctionInfo::IncomingArgSize which holds the sizeAkira Hatanaka2012-11-021-0/+1
| | | | | | of the incoming argument area. llvm-svn: 167312
* [mips] Allow tail-call optimization for vararg functions and functions whichAkira Hatanaka2012-10-301-13/+17
| | | | | | use the caller's stack. llvm-svn: 167048
* Add code for saving formal argument information to MipsFunctionInfo. ThisAkira Hatanaka2012-10-301-0/+2
| | | | | | | information will be used by IsEligibleForTailCallOptimization to determine whether a call can be tail-call optimized. llvm-svn: 167043
* Add definition of function MipsTargetLowering::passArgOnStack which emits nodesAkira Hatanaka2012-10-301-0/+18
| | | | | | for passing a function call argument on a stack. llvm-svn: 167041
* Do not do tail-call optimization if target is mips16.Akira Hatanaka2012-10-301-0/+4
| | | | llvm-svn: 167039
* Expand all atomic ops for mips16.Reed Kotler2012-10-291-2/+23
| | | | llvm-svn: 166935
* [mips] Do not tail-call optimize vararg functions or functions with byvalAkira Hatanaka2012-10-271-8/+6
| | | | | | | | arguments. This is rather conservative and should be fixed later to be more aggressive. llvm-svn: 166851
* [mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in theAkira Hatanaka2012-10-271-1/+4
| | | | | | previous iteration. llvm-svn: 166850
* Use the methods and classes that were added to simplify LowerCall and Akira Hatanaka2012-10-271-413/+41
| | | | | | | | LowerFormalArguments in MipsTargetLowering. No functionality change intended. llvm-svn: 166846
* Add method MipsTargetLowering::writeVarArgRegs which copies argument registersAkira Hatanaka2012-10-271-0/+45
| | | | | | of vararg functions back to the stack. llvm-svn: 166844
* Add method MipsTargetLowering::passByValArg.Akira Hatanaka2012-10-271-0/+97
| | | | | | | | 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/+43
| | | | | | | | 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/+128
| | | | | | arguments and inquire about calling convention information. llvm-svn: 166840
* Delete MipsFunctionInfo::InArgFIRange. Akira Hatanaka2012-10-261-2/+0
| | | | llvm-svn: 166837
* [mips] Make sure sret argument is returned in register V0.Akira Hatanaka2012-10-241-2/+3
| | | | llvm-svn: 166539
OpenPOWER on IntegriCloud