summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsISelLowering.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove (hopefully) all trailing whitespaces from the mips backend. Patch by ↵Bruno Cardoso Lopes2011-03-041-7/+7
| | | | | | Hatanaka, Akira llvm-svn: 127003
* Add support for mips32 madd and msub instructions. Patch by Akira HatanakaBruno Cardoso Lopes2011-01-181-1/+9
| | | | llvm-svn: 123760
* Remove target specific node MipsISD::CMov, which is not used because all ↵Bruno Cardoso Lopes2010-12-071-3/+0
| | | | | | conditional moves are directly matched using tablegen patterns. If there's a need in the future, we can introduce it again llvm-svn: 121164
* Inline asm multiple alternative constraints development phase 2 - improved ↵John Thompson2010-10-291-0/+5
| | | | | | basic logic, added initial platform support. llvm-svn: 117667
* Split the SDValue out of OutputArg so that SelectionDAG-independentDan Gohman2010-07-071-0/+2
| | | | | | code can do calling-convention queries. This obviates OutputArgReg. llvm-svn: 107786
* Get rid of the EdgeMapping map. Instead, just check for BasicBlockDan Gohman2010-05-011-3/+3
| | | | | | changes before doing phi lowering for switches. llvm-svn: 102809
* Use const qualifiers with TargetLowering. This eliminates severalDan Gohman2010-04-171-16/+16
| | | | | | | | | | | | | const_casts, and it reinforces the design of the Target classes being immutable. SelectionDAGISel::IsLegalToFold is now a static member function, because PIC16 uses it in an unconventional way. There is more room for API cleanup here. And PIC16's AsmPrinter no longer uses TargetLowering. llvm-svn: 101635
* Move per-function state out of TargetLowering subclasses and intoDan Gohman2010-04-171-3/+0
| | | | | | MachineFunctionInfo subclasses. llvm-svn: 101634
* Add suport for VASTART on Mips.Bruno Cardoso Lopes2010-02-061-0/+3
| | | | llvm-svn: 95506
* Revert 95130.Evan Cheng2010-02-021-1/+1
| | | | llvm-svn: 95160
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-021-1/+1
| | | | | | sibcall eligibility. llvm-svn: 95130
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-271-1/+1
| | | | | | | | | Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. llvm-svn: 94626
* Add a second ValueType argument to isFPImmLegal.Evan Cheng2009-10-281-1/+1
| | | | llvm-svn: 85361
* Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which ↵Evan Cheng2009-10-271-0/+5
| | | | | | returns true if the fp immediate can be natively codegened by target. llvm-svn: 85281
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-181-1/+2
| | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. llvm-svn: 82273
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-4/+4
| | | | llvm-svn: 80773
* reintroduce support for Mips "small" section handling. This is Chris Lattner2009-08-131-2/+0
| | | | | | | implemented somewhat differently than before, but it should have the same functionality and the previous testcase passes again. llvm-svn: 78900
* Restore some "small section" support code, reverting my patch from r76936.Chris Lattner2009-08-131-2/+5
| | | | llvm-svn: 78894
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-1/+1
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-3/+3
| | | | | | own struct type. llvm-svn: 78610
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-101-1/+1
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* Major calling convention code refactoring.Dan Gohman2009-08-051-5/+27
| | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. llvm-svn: 78142
* remove more remnants of small section support.Chris Lattner2009-07-241-2/+0
| | | | llvm-svn: 76936
* Small cleanups in the PowerPC backend.Tilmann Scheller2009-07-031-2/+0
| | | | | | | | | | 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-0/+2
| | | | | | | | | | 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
* Added support for fround, fextend and FP_TO_SINTBruno Cardoso Lopes2009-05-271-0/+4
| | | | llvm-svn: 72483
* Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowingDan Gohman2009-02-071-1/+1
| | | | | | ScheduleDAG's TLI member to use const. llvm-svn: 64018
* 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
* Teach DAGCombine to fold constant offsets into GlobalAddress nodes,Dan Gohman2008-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | and add a TargetLowering hook for it to use to determine when this is legal (i.e. not in PIC mode, etc.) This allows instruction selection to emit folded constant offsets in more cases, such as the included testcase, eliminating the need for explicit arithmetic instructions. This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp that attempted to achieve the same effect, but wasn't as effective. Also, fix handling of offsets in GlobalAddressSDNodes in several places, including changing GlobalAddressSDNode's offset from int to int64_t. The Mips, Alpha, Sparc, and CellSPU targets appear to be unaware of GlobalAddress offsets currently, so set the hook to false on those targets. llvm-svn: 57748
* Fix these enums' starting values to reflect the way thatDan Gohman2008-09-231-1/+1
| | | | | | instruction opcodes are now numbered. No functionality change. llvm-svn: 56497
* Define CallSDNode, an SDNode subclass for use with ISD::CALL.Dan Gohman2008-09-131-1/+1
| | | | | | | | | | | | | 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
* Removed SELECT_CC custom lowering. This is not needed anymore, the SELECT nodeBruno Cardoso Lopes2008-08-131-1/+3
| | | | | | | | | | | | | | | | is lowered properly and covers everything LowerSELECT_CC did. Added method printUnsignedImm in AsmPrinter to print uimm16 operands. This avoid the ugly instruction by instruction checking in printOperand. Added a swap instruction present in the allegrex core. Added two conditional instructions present in the allegrex core : MOVZ and MOVN. They both allow a more efficient SELECT operation for integers. Also added SELECT patterns to optimize MOVZ and MOVN usage. The brcond and setcc patterns were cleaned: redundant and suboptimal patterns were removed. The suboptimals were replaced by more efficient ones. Fixed some instructions that were using immZExt16 instead of immSExt16. llvm-svn: 54724
* Added Mips support for DYNAMIC_STACKALLOCBruno Cardoso Lopes2008-08-071-0/+1
| | | | | | | | | Fixed bug in adjustMipsStackFrame, which was breaking while trying to access a dead stack object index. Also added one more alignment before fixing the callee saved registers stack offset adjustment. llvm-svn: 54485
* Mips ISelLowering cleanup : Removed old LowerCALL and FORMAL_ARGS helpers, theyBruno Cardoso Lopes2008-08-041-2/+0
| | | | | | | aren't used anyway, they also used to broke compiling when fastcc was specified for a function, but not anymore. llvm-svn: 54316
* Apply the same pattern used in 'and' lowering for 'or'Bruno Cardoso Lopes2008-08-021-1/+1
| | | | llvm-svn: 54273
* Handle more SELECT corner cases considering legalize types, probabily wont ↵Bruno Cardoso Lopes2008-07-311-4/+5
| | | | | | | | work with the default legalizer. llvm-svn: 54249
* Added floating point lowering for select.Bruno Cardoso Lopes2008-07-291-0/+4
| | | | llvm-svn: 54167
* Added floating point lowering for setcc and brcond.Bruno Cardoso Lopes2008-07-281-0/+2
| | | | | | | Fixed COMM asm directive usage. ConstantPool using custom FourByteConstantSection. llvm-svn: 54139
* Rename SDOperand to SDValue.Dan Gohman2008-07-271-13/+13
| | | | llvm-svn: 54128
* Minor fixes.Bruno Cardoso Lopes2008-07-231-2/+1
| | | | | | Added ConstantPool support. llvm-svn: 53951
* Added initial support for small sections on Mips.Bruno Cardoso Lopes2008-07-211-1/+4
| | | | | | | Added gp_rel relocations to support addressing small section contents. Added command line to specify small section threshold in bytes. llvm-svn: 53869
* Fixe typos and 80 column size problemsBruno Cardoso Lopes2008-07-091-2/+2
| | | | llvm-svn: 53272
* MipsTargetLowering cleanupBruno Cardoso Lopes2008-07-091-0/+1
| | | | llvm-svn: 53270
* Several changes to Mips backend, experimental fp support being the mostBruno Cardoso Lopes2008-07-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | important. - Cleanup in the Subtarget info with addition of new features, not all support yet, but they allow the future inclusion of features easier. Among new features, we have : Arch family info (mips1, mips2, ...), ABI info (o32, eabi), 64-bit integer and float registers, allegrex vector FPU (VFPU), single float only support. - TargetMachine now detects allegrex core. - Added allegrex (Mips32r2) sext_inreg instructions. - *Added Float Point Instructions*, handling single float only, and aliased accesses for 32-bit FPUs. - Some cleanup in FP instruction formats and FP register classes. - Calling conventions improved to support mips 32-bit EABI. - Added Asm Printer support for fp cond codes. - Added support for sret copy to a return register. - EABI support added into LowerCALL and FORMAL_ARGS. - MipsFunctionInfo now keeps a virtual register per function to track the sret on function entry until function ret. - MipsInstrInfo FP support into methods (isMoveInstr, isLoadFromStackSlot, ...), FP cond codes mapping and initial FP Branch Analysis. - Two new Mips SDNode to handle fp branch and compare instructions : FPBrcond, FPCmp - MipsTargetLowering : handling different FP classes, Allegrex support, sret return copy, no homing location within EABI, non 32-bit stack objects arguments, and asm constraint for float. llvm-svn: 53146
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-3/+3
| | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). llvm-svn: 52044
* Added custom SELECT_CC loweringBruno Cardoso Lopes2008-06-061-0/+7
| | | | | | Added special isel for ADDE,SUBE and new patterns to match SUBC,ADDC llvm-svn: 52031
* Give TargetLowering::getSetCCResultType() a parameter so that ISD::SETCC'sScott Michel2008-03-101-0/+3
| | | | | | | | return ValueType can depend its operands' ValueType. This is a cosmetic change, no functionality impacted. llvm-svn: 48145
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Added JumpTable supportBruno Cardoso Lopes2007-11-121-0/+1
| | | | | | | Fixed some AsmPrinter issues Added GLOBAL_OFFSET_TABLE Node handle. llvm-svn: 44024
OpenPOWER on IntegriCloud