summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-181-1/+0
| | | | | | better location welcome). llvm-svn: 135438
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-181-13/+1
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* Migrate LLVM and Clang to use the new makeArrayRef(...) functions where ↵Frits van Bommel2011-07-181-12/+12
| | | | | | | | previously explicit non-default constructors were used. Mostly mechanical with some manual reformatting. llvm-svn: 135390
* Next round of MC refactoring. This patch factor MC table instantiations, MCEvan Cheng2011-07-141-1/+0
| | | | | | registeration and creation code into XXXMCDesc libraries. llvm-svn: 135184
* Remove redundant Thumb2 ADD/SUB SP instruction definitions.Jim Grosbach2011-06-291-4/+0
| | | | | | | | | | Unlike Thumb1, Thumb2 does not have dedicated encodings for adjusting the stack pointer. It can just use the normal add-register-immediate encoding since it can use all registers as a source, not just R0-R7. The extra instruction definitions are just duplicates of the normal instructions with the (not well enforced) constraint that the source register was SP. llvm-svn: 134114
* Move CallFrameSetupOpcode and CallFrameDestroyOpcode to TargetInstrInfo.Evan Cheng2011-06-281-2/+1
| | | | llvm-svn: 134030
* Hide more details in tablegen generated MCRegisterInfo ctor function.Evan Cheng2011-06-281-2/+1
| | | | llvm-svn: 134027
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-281-5/+5
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* More refactoring. Move getRegClass from TargetOperandInfo to TargetInstrInfo.Evan Cheng2011-06-271-1/+1
| | | | llvm-svn: 133944
* Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.incEvan Cheng2011-06-271-1/+3
| | | | | | into XXXGenRegisterInfo.inc. llvm-svn: 133922
* Starting to refactor Target to separate out code that's needed to fully describeEvan Cheng2011-06-241-3/+4
| | | | | | | | | | | | target machine from those that are only needed by codegen. The goal is to sink the essential target description into MC layer so we can start building MC based tools without needing to link in the entire codegen. First step is to refactor TargetRegisterInfo. This patch added a base class MCRegisterInfo which TargetRegisterInfo is derived from. Changed TableGen to separate register description from the rest of the stuff. llvm-svn: 133782
* Reserve D16-D13 on subtargets that don't support them.Jakob Stoklund Olesen2011-06-181-0/+6
| | | | llvm-svn: 133321
* Explicitly invoke ArrayRef constructor to keep gcc happy.Jakob Stoklund Olesen2011-06-171-12/+12
| | | | | | Patch by Richard Smith! llvm-svn: 133220
* Rename TRI::getAllocationOrder() to getRawAllocationOrder().Jakob Stoklund Olesen2011-06-161-38/+22
| | | | | | | | | | | Also switch the return type to ArrayRef<unsigned> which works out nicely for ARM's implementation of this function because of the clever ArrayRef constructors. The name change indicates that the returned allocation order may contain reserved registers as has been the case for a while. llvm-svn: 133216
* Use the dwarf->llvm mapping to print register names in the cfiRafael Espindola2011-05-301-0/+4
| | | | | | | | directives. Fixes PR9826. llvm-svn: 132317
* Reuse the TargetInstrDesc.Cameron Zwarich2011-05-191-2/+1
| | | | llvm-svn: 131625
* Correctly constrain a register class when computing frame offsets, as the Thumb2Cameron Zwarich2011-05-191-0/+4
| | | | | | add instruction takes an rGPR. This fixes the last of PR8825. llvm-svn: 131619
* Add a TRI::getLargestLegalSuperClass hook to provide an upper limit on ↵Jakob Stoklund Olesen2011-04-261-0/+19
| | | | | | | | | | | | register class inflation. The hook will be used by the register allocator when recomputing register classes after removing constraints. Thumb1 code doesn't allow anything larger than tGPR, and x86 needs to ensure that the spill size doesn't change. llvm-svn: 130228
* Avoid write-after-write issue hazards for Cortex-A9.Bob Wilson2011-04-191-0/+23
| | | | | | | | | | | Add a avoidWriteAfterWrite() target hook to identify register classes that suffer from write-after-write hazards. For those register classes, try to avoid writing the same register in two consecutive instructions. This is currently disabled by default. We should not spill to avoid hazards! The command line flag -avoid-waw-hazard can be used to enable waw avoidance. llvm-svn: 129772
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Ignore special ARM allocation hints for unexpected register classes.Jakob Stoklund Olesen2011-03-251-0/+4
| | | | | | | | | Add an assertion to linear scan to prevent it from allocating registers outside the register class. <rdar://problem/9183021> llvm-svn: 128254
* Move getRegPressureLimit() from TargetLoweringInfo to TargetRegisterInfo.Cameron Zwarich2011-03-071-0/+20
| | | | llvm-svn: 127175
* Implement frame unwinding information emission for Thumb1. Not finished yet ↵Anton Korobeynikov2011-03-051-2/+3
| | | | | | because there is no way given the constpool index to examine the actual entry: the reason is clones inserted by constant island pass, which are not tracked at all! The only connection is done during asmprinting time via magic label names which is really gross and needs to be eventually fixed. llvm-svn: 127104
* Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov2011-01-101-13/+13
| | | | | | and fixes here and there. llvm-svn: 123170
* Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.Jakob Stoklund Olesen2011-01-101-1/+1
| | | | | | | | These functions not longer assert when passed 0, but simply return false instead. No functional change intended. llvm-svn: 123155
* During local stack slot allocation, the materializeFrameBaseRegister functionBill Wendling2010-12-171-7/+13
| | | | | | | | | | | | | | | may be called. If the entry block is empty, the insertion point iterator will be the "end()" value. Calling ->getParent() on it (among others) causes problems. Modify materializeFrameBaseRegister to take the machine basic block and insert the frame base register at the beginning of that block. (It's very similar to what the code does all ready. The only difference is that it will always insert at the beginning of the entry block instead of after a previous materialization of the frame base register. I doubt that that matters here.) <rdar://problem/8782198> llvm-svn: 122104
* When using multiple instructions to reference a frame index, make sure toJim Grosbach2010-12-091-0/+5
| | | | | | update the opcode when necessary as well as the source register. llvm-svn: 121346
* Move more PEI-related hooks to TFIAnton Korobeynikov2010-11-271-322/+0
| | | | llvm-svn: 120229
* Fix epilogue codegen to avoid leaving the stack pointer in an invalidEvan Cheng2010-11-221-3/+4
| | | | | | | | | | | | | | | | | state. Previously Thumb2 would restore sp from fp like this: mov sp, r7 sub, sp, #4 If an interrupt is taken after the 'mov' but before the 'sub', callee-saved registers might be clobbered by the interrupt handler. Instead, try restoring directly from sp: add sp, #4 Or, if necessary (with VLA, etc.) use a scratch register to compute sp and then restore it: sub.w r4, r7, #8 mov sp, r7 rdar://8465407 llvm-svn: 119977
* Move some more hooks to TargetFrameInfoAnton Korobeynikov2010-11-201-92/+4
| | | | llvm-svn: 119904
* Move hasFP() and few related hooks to TargetFrameInfo.Anton Korobeynikov2010-11-181-58/+25
| | | | llvm-svn: 119740
* Code clean up.Evan Cheng2010-11-181-6/+2
| | | | llvm-svn: 119604
* First step of huge frame-related refactoring: move emit{Prologue,Epilogue} ↵Anton Korobeynikov2010-11-151-331/+0
| | | | | | out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place llvm-svn: 119097
* Revert this temporarily.Eric Christopher2010-11-111-25/+17
| | | | llvm-svn: 118827
* Change the prologue and epilogue to use push/pop for the low ARM registers.Eric Christopher2010-11-111-17/+25
| | | | llvm-svn: 118823
* Revert r114340 (improvements in Darwin function prologue/epilogue), as it brokeJim Grosbach2010-11-021-23/+89
| | | | | | assumptions about stack layout. Specifically, LR must be saved next to FP. llvm-svn: 118026
* Refactor ARM STR/STRB instruction patterns into STR{B}i12 and STR{B}rs, likeJim Grosbach2010-10-271-2/+2
| | | | | | | | the LDR instructions have. This makes the literal/register forms of the instructions explicit and allows us to assign scheduling itineraries appropriately. rdar://8477752 llvm-svn: 117505
* Split ARM::LDRB into LDRBi12 and LDRBrs. Adjust accordingly. Continuing onJim Grosbach2010-10-271-1/+1
| | | | | | rdar://8477752. llvm-svn: 117419
* First part of refactoring ARM addrmode2 (load/store) instructions to be moreJim Grosbach2010-10-261-4/+6
| | | | | | | | explicit about the operands. Split out the different variants into separate instructions. This gives us the ability to, among other things, assign different scheduling itineraries to the variants. rdar://8477752. llvm-svn: 117409
* Nuke extraneous comment. It's applicable elsewhere, but not in this func.Jim Grosbach2010-10-261-2/+0
| | | | llvm-svn: 117387
* Nuke a commented out bit that got missed a while back.Jim Grosbach2010-10-191-1/+1
| | | | llvm-svn: 116883
* For Thumb2, try to use frame pointer references for stack slots even when aJim Grosbach2010-10-181-2/+10
| | | | | | base register is available. rdar://8525298 llvm-svn: 116729
* ARM addrmode4 instructions (ldm, stm and friends) can't encode an immediateJim Grosbach2010-10-181-1/+2
| | | | | | | | offset for stack references. Make sure we take that into account when deciding whether to reserver an emergency spill slot for the register scavenger. rdar://8559625 llvm-svn: 116714
* Grammar tweak.Jim Grosbach2010-10-181-1/+1
| | | | llvm-svn: 116712
* Simplify ARM callee-saved register handling by removing the distinctionJim Grosbach2010-09-201-89/+23
| | | | | | | | | | | | | | | | | | | between the high and low registers for prologue/epilogue code. This was a Darwin-only thing that wasn't providing a realistic benefit anymore. Combining the save areas simplifies the compiler code and results in better ARM/Thumb2 codegen. For example, previously we would generate code like: push {r4, r5, r6, r7, lr} add r7, sp, #12 stmdb sp!, {r8, r10, r11} With this change, we combine the register saves and generate: push {r4, r5, r6, r7, r8, r10, r11, lr} add r7, sp, #12 rdar://8445635 llvm-svn: 114340
* move getRegisterNumbering() to out of ARMBaseRegisterInfo into the helperJim Grosbach2010-09-151-40/+0
| | | | | | | | | functions in ARMBaseInfo.h so it can be used in the MC library as well. For anything bigger than this, we may want a means to have a small support library for shared helper functions like this. Cross that bridge when we come to it. llvm-svn: 114016
* simplify getRegisterNumbering(). Remove the unused isSPVFP argument andJim Grosbach2010-09-151-86/+35
| | | | | | merge the common cases. llvm-svn: 114013
* Re-enable usage of the ARM base pointer. r113394 fixed the known failures.Jim Grosbach2010-09-081-1/+1
| | | | | | Re-running some nightly testers w/ it enabled to verify. llvm-svn: 113399
* Fix errant fall-throughs causing the base pointer to be used when the frameJim Grosbach2010-09-081-3/+3
| | | | | | pointer was intended. rdar://8401980 llvm-svn: 113394
* Be more careful about when to do dynamic stack realignment. Since we have anJim Grosbach2010-09-081-2/+9
| | | | | | | option to disable base pointer usage, pay attention to it when deciding if we can realign (if no base pointer and VLAs, we can't). llvm-svn: 113366
OpenPOWER on IntegriCloud