summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips
Commit message (Collapse)AuthorAgeFilesLines
* Add register-reuse to frame-index register scavenging. When a target usesJim Grosbach2009-10-072-5/+7
| | | | | | | | | | | | | | | | | | | | a virtual register to eliminate a frame index, it can return that register and the constant stored there to PEI to track. When scavenging to allocate for those registers, PEI then tracks the last-used register and value, and if it is still available and matches the value for the next index, reuses the existing value rather and removes the re-materialization instructions. Fancier tracking and adjustment of scavenger allocations to keep more values live for longer is possible, but not yet implemented and would likely be better done via a different, less special-purpose, approach to the problem. eliminateFrameIndex() is modified so the target implementations can return the registers they wish to be tracked for reuse. ARM Thumb1 implements and utilizes the new mechanism. All other targets are simply modified to adjust for the changed eliminateFrameIndex() prototype. llvm-svn: 83467
* Instead of printing unnecessary basic block labels as labels inDan Gohman2009-10-061-1/+0
| | | | | | | | | | verbose-asm mode, print comments instead. This eliminates a non-comment difference between verbose-asm mode and non-verbose-asm mode. Also, factor out the relevant code out of all the targets and into target-independent code. llvm-svn: 83392
* Update processDebugLoc() so that it can be used to process debug info before ↵Devang Patel2009-10-061-2/+3
| | | | | | and after printing an instruction. llvm-svn: 83363
* Remove explicit enum integer values. They don't appear to be needed, andDan Gohman2009-10-051-5/+5
| | | | | | they make it less convenient to add new entries. llvm-svn: 83308
* Use MachineInstr as an processDebugLoc() argument.Devang Patel2009-09-301-1/+1
| | | | | | This will allow processDebugLoc() to handle scopes for DWARF debug info. llvm-svn: 83183
* Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use thisBob Wilson2009-09-301-4/+2
| | | | | | | | | | | | | | | | to emit target-specific things at the beginning of the asm output. This fixes a problem for PPC, where the text sections are not being kept together as expected. The base class doInitialization code calls DW->BeginModule() which emits a bunch of DWARF section directives. The PPC doInitialization code then emits all the TEXT section directives, with the intention that they will be kept together. But as I understand it, the Darwin assembler treats the default TEXT section as a special case and moves it to the beginning of the file, which means that all those DWARF sections are in the middle of the text. With this change, the EmitStartOfAsmFile hook is called before the DWARF section directives are emitted, so that all the PPC text section directives come out right at the beginning of the file. llvm-svn: 83176
* Rename getTargetNode to getMachineNode, for consistency with theDan Gohman2009-09-251-15/+15
| | | | | | | | naming scheme used in SelectionDAG, where there are multiple kinds of "target" nodes, but "machine" nodes are nodes which represent a MachineInstr. llvm-svn: 82790
* Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic ↵Evan Cheng2009-09-191-1/+4
| | | | | | blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks. llvm-svn: 82311
* Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that ↵Evan Cheng2009-09-182-2/+4
| | | | | | | | sdisel will use to properly complete phi nodes. Not functionality change yet. llvm-svn: 82273
* remove all but one reference to TargetRegisterDesc::AsmName.Chris Lattner2009-09-131-9/+4
| | | | llvm-svn: 81714
* the tblgen produced 'getRegisterName' method does not accessChris Lattner2009-09-131-1/+1
| | | | | | the object, make it static instead of const. llvm-svn: 81711
* make tblgen produce a function that returns the name for a physreg.Chris Lattner2009-09-131-0/+2
| | | | | | Nothing is using this info yet. llvm-svn: 81707
* replace printBasicBlockLabel with EmitBasicBlockStart,Chris Lattner2009-09-131-1/+1
| | | | | | | now that printBasicBlockLabel is only used for starting a MBB. This allows elimination of a bunch of arguments. llvm-svn: 81684
* convert some uses of printBasicBlockLabel to use GetMBBSymbolChris Lattner2009-09-131-1/+2
| | | | | | instead. llvm-svn: 81677
* remove DebugLoc from MCInst and eliminate "Comment printing" fromChris Lattner2009-09-091-0/+7
| | | | | | | | | | | | | the MCInst path of the asmprinter. Instead, pull comment printing out of the autogenerated asmprinter into each target that uses the autogenerated asmprinter. This causes code duplication into each target, but in a way that will be easier to clean up later when more asmprinter stuff is commonized into the base AsmPrinter class. This also fixes an xcore strangeness where it inserted two tabs before every instruction. llvm-svn: 81396
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-022-8/+8
| | | | llvm-svn: 80773
* Reapply 80278Bruno Cardoso Lopes2009-09-014-45/+71
| | | | | | | | Add MO flags to simplify the printing of relocations. Remove the support for printing large code model relocs (which aren't supported anyway). llvm-svn: 80691
* Normalize makefile comments and sort cmake file lists.Benjamin Kramer2009-08-311-1/+1
| | | | llvm-svn: 80584
* Revert 80278 for now, it caused a lot of MIPS tests to failBruno Cardoso Lopes2009-08-274-61/+40
| | | | llvm-svn: 80280
* Revamp our friend Mips :)Bruno Cardoso Lopes2009-08-274-40/+61
| | | | | | | | Add MO flags to simplify the printing of relocations. Remove the support for printing large code model relocs (which aren't supported anyway). llvm-svn: 80278
* Fix some refactos for iostream changes (in -Asserts mode).Daniel Dunbar2009-08-231-4/+4
| | | | | | - The world needs better C++ refactoring tools, can I get an Amen!? llvm-svn: 79843
* eliminate the last DOUTs from the targets.Chris Lattner2009-08-232-40/+18
| | | | llvm-svn: 79833
* remove various std::ostream version of printing methods fromChris Lattner2009-08-231-6/+6
| | | | | | | | MachineInstr and MachineOperand. This required eliminating a bunch of stuff that was using DOUT, I hope that bill doesn't mind me stealing his fun. ;-) llvm-svn: 79813
* Forgot to update some CMakeLists.Benjamin Kramer2009-08-221-1/+1
| | | | llvm-svn: 79780
* Update CMake build, unbreak linux build.Benjamin Kramer2009-08-221-1/+1
| | | | llvm-svn: 79779
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-8/+8
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-224-14/+14
| | | | llvm-svn: 79763
* eliminate AsmPrinter::SwitchToSection and just have clientsChris Lattner2009-08-191-3/+5
| | | | | | talk to the MCStreamer directly instead. llvm-svn: 79405
* reintroduce support for Mips "small" section handling. This is Chris Lattner2009-08-137-51/+140
| | | | | | | 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-134-6/+59
| | | | llvm-svn: 78894
* This void is implicit in C++.Dan Gohman2009-08-123-3/+3
| | | | llvm-svn: 78848
* Change TargetAsmInfo to be constructed via TargetRegistry from a Target+TripleChris Lattner2009-08-124-10/+7
| | | | | | | | pair instead of from a virtual method on TargetMachine. This cuts the final ties of TargetAsmInfo to TargetMachine, meaning that MC can now use TargetAsmInfo. llvm-svn: 78802
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-114-156/+156
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* pass the TargetTriple down from each target ctor to theChris Lattner2009-08-111-3/+2
| | | | | | LLVMTargetMachine ctor. It is currently unused. llvm-svn: 78711
* now that JumpTableDirective can differentate picness itself, MIPS TAI Chris Lattner2009-08-113-11/+6
| | | | | | no longer needs a targetmachine to initialize itself. llvm-svn: 78710
* split "JumpTableDirective" (an existing hack) into a PIC and nonPICChris Lattner2009-08-111-3/+1
| | | | | | | | | | version. This allows TAI implementations to specify the directive to use based on the mode being codegen'd for. The real fix for this is to remove JumpTableDirective, but I don't feel like diving into the jumptable snarl just now. llvm-svn: 78709
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-104-165/+165
| | | | | | own struct type. llvm-svn: 78610
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-102-2/+2
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* make printInstruction return void since its result is omitted. Make the Chris Lattner2009-08-081-1/+1
| | | | | | error condition get trapped with an assert. llvm-svn: 78449
* Remove dead code. MDNode and MDString are not Constant anymore.Devang Patel2009-08-051-3/+0
| | | | llvm-svn: 78207
* Major calling convention code refactoring.Dan Gohman2009-08-054-101/+97
| | | | | | | | | | | | | | | | | | | 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
* this really shouldn't switch sections without telling the asmprinter, butChris Lattner2009-08-031-1/+1
| | | | | | hey it uses .previous, so it should work :) llvm-svn: 78004
* Remove -disable-mips-abicall and -enable-mips-absolute-call command-line Eli Friedman2009-08-036-50/+26
| | | | | | | | | | | | | options, which don't appear to be useful. -enable-mips-absolute-call is completely unused (and unless I'm mistaken, is supposed to have the same effect that -relocation-model=dynamic-no-pic should have), and -disable-mips-abicall appears to be effectively a synonym for -relocation-model=static. Adjust the few users of hasABICall to checks which seem more appropriate. Update MipsSubtarget, MipsTargetMachine, and MipselTargetMachine to synchronize with recent changes. llvm-svn: 77938
* Move most targets TargetMachine constructor to only taking a target triple.Daniel Dunbar2009-08-022-8/+5
| | | | | | - The C, C++, MSIL, and Mips backends still need the module. llvm-svn: 77927
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-023-7/+4
| | | | | | | | | | Module*. Also, dropped uses of TargetMachine where unnecessary. The only target which still takes a TargetMachine& is Mips, I would appreciate it if someone would normalize this to match other targets. llvm-svn: 77918
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-022-5/+3
| | | | | | no longer depends on TM! llvm-svn: 77863
* .rdata == .rodata on mips.Chris Lattner2009-08-011-1/+0
| | | | llvm-svn: 77827
* REmove dead fields of TAI.Chris Lattner2009-08-011-2/+0
| | | | llvm-svn: 77820
* Minor code simplifications.Dan Gohman2009-08-011-1/+0
| | | | llvm-svn: 77768
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-23/+10
| | | | | | No functionality change. llvm-svn: 77432
OpenPOWER on IntegriCloud