summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move kill flags when the same register occurs more than once in a sequence.Jakob Stoklund Olesen2009-12-231-1/+22
| | | | llvm-svn: 92058
* Handle undef operands properly.Jakob Stoklund Olesen2009-12-231-4/+8
| | | | llvm-svn: 92054
* Make insert position available to MergeOpsUpdate.Jakob Stoklund Olesen2009-12-231-24/+25
| | | | | | | Rearrange arguments. No functional changes llvm-svn: 92053
* Perform kill flag calculations in new method. No functional changes.Jakob Stoklund Olesen2009-12-231-12/+15
| | | | llvm-svn: 92052
* Move repeated code to a new method. No functional change.Jakob Stoklund Olesen2009-12-231-17/+47
| | | | llvm-svn: 92051
* Fix a bunch of little errors that Clang complains about when its being pedanticDouglas Gregor2009-12-191-1/+1
| | | | llvm-svn: 91764
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-3/+3
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* When expanding t2STRDi8 r, r to two stores, add kill markers correctly.Evan Cheng2009-11-141-0/+7
| | | | llvm-svn: 88734
* Use Unified Assembly Syntax for the ARM backend.Jim Grosbach2009-11-091-46/+46
| | | | llvm-svn: 86494
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-2/+2
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Load / store multiple was missing opportunites when the load / store bundles ↵Evan Cheng2009-10-221-0/+3
| | | | | | are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit. llvm-svn: 84842
* Change ld/st multiples to explicitly model the writeback to base register. ↵Evan Cheng2009-10-011-3/+20
| | | | | | This fixes most of the -ldstopti-before-sched2 regressions. llvm-svn: 83191
* Fix PR4687. Pre ARMv5te does not support ldrd / strd. Patch by John Tytgat.Evan Cheng2009-09-291-0/+4
| | | | llvm-svn: 83058
* Enable pre-regalloc load / store multiple pass for Thumb2.Evan Cheng2009-09-271-55/+88
| | | | llvm-svn: 82893
* Add comment.Evan Cheng2009-09-261-0/+1
| | | | llvm-svn: 82836
* Code clean up and prepare for Thumb2 support. No functionality changes.Evan Cheng2009-09-251-21/+49
| | | | llvm-svn: 82805
* Improve MachineMemOperand handling.Dan Gohman2009-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | | - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
* Update register class references to use the global constant ↵Jim Grosbach2009-09-111-1/+1
| | | | | | ARM::*RegisterClass names. llvm-svn: 81556
* Simplify RegScavenger::FindUnusedReg.Jakob Stoklund Olesen2009-08-181-6/+2
| | | | | | | | | - Drop the Candidates argument and fix all callers. Now that RegScavenger tracks available registers accurately, there is no need to restict the search. - Make sure that no aliases of the found register are in use. This was a potential bug. llvm-svn: 79369
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+4
| | | | llvm-svn: 78948
* Whitespace cleanup. Remove trailing whitespace.Jim Grosbach2009-08-111-2/+2
| | | | llvm-svn: 78666
* Code refactoring. No functionality change.Evan Cheng2009-08-081-22/+9
| | | | llvm-svn: 78455
* It turns out most of the thumb2 instructions are not allowed to touch SP. ↵Evan Cheng2009-08-071-4/+16
| | | | | | | | | | The semantics of such instructions are unpredictable. We have just been lucky that tests have been passing. This patch takes pain to ensure all the PEI lowering code does the right thing when lowering frame indices, insert code to manipulate stack pointers, etc. It's also custom lowering dynamic stack alloc into pseudo instructions so we can insert the right instructions at scheduling time. This fixes PR4659 and PR4682. llvm-svn: 78361
* Enable load / store multiple pass for Thumb2. It's not using ldrd / strd yet.Evan Cheng2009-08-041-6/+9
| | | | llvm-svn: 78104
* Thumb2 does not have ib (increment before) and da (decrement after) forms of ↵Evan Cheng2009-08-041-4/+10
| | | | | | ldm / stm. llvm-svn: 78057
* Load / store multiple pass fixes for Thumb2. Not enabled yet.Evan Cheng2009-08-041-76/+85
| | | | llvm-svn: 78031
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-3/+3
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Major changes to Thumb (not Thumb2). Many 16-bit instructions either ↵Evan Cheng2009-07-111-1/+1
| | | | | | | | modifies CPSR when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically. A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well. llvm-svn: 75359
* Remove a bogus assertion.Evan Cheng2009-07-101-2/+0
| | | | llvm-svn: 75206
* Initial support for load / store multiple opt pass Thumb2 support ↵Evan Cheng2009-07-091-55/+158
| | | | | | (post-allocation only). It's kind of there, but not quite. I'll return to this later. llvm-svn: 75190
* Change how so_imm and t2_so_imm are handled. At instruction selection time, ↵Evan Cheng2009-07-081-3/+2
| | | | | | the immediates are no longer encoded in the imm8 + rot format, that are left as it is. The encoding is now done in ams printing and code emission time instead. llvm-svn: 75048
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-3/+3
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Start converting to new error handling API.Torok Edwin2009-07-081-3/+4
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Enable arm pre-allocation load / store multiple optimization pass.Evan Cheng2009-06-191-16/+36
| | | | llvm-svn: 73791
* Transfer dead markers when a ldrd is changed into a ldm or a pair of ldr.Evan Cheng2009-06-191-15/+20
| | | | llvm-svn: 73749
* - Update register allocation hint after coalescing. This is done by the ↵Evan Cheng2009-06-181-18/+48
| | | | | | | | | target since the hint is target dependent. This is important for ARM register pair hints. - Register allocator should resolve the second part of the hint (register number) before passing it to the target since it knows virtual register to physical register mapping. - More fixes to get ARM load / store double word working. llvm-svn: 73671
* Typo.Evan Cheng2009-06-151-1/+1
| | | | llvm-svn: 73422
* Do not form ldrd / strd if the two dests / srcs are the same. Code clean up.Evan Cheng2009-06-151-59/+73
| | | | llvm-svn: 73413
* Silence a warning.Evan Cheng2009-06-151-1/+1
| | | | llvm-svn: 73406
* Part 1.Evan Cheng2009-06-151-6/+197
| | | | | | | | | | | | | | | | | | | | | - Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent. - Allow targets to specify alternative register allocation orders based on allocation hint. Part 2. - Use the register allocation hint system to implement more aggressive load / store multiple formation. - Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g. v1025 = LDR v1024, 0 v1026 = LDR v1024, 0 => v1025,v1026 = LDRD v1024, 0 If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair. - Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions. This is work in progress, not yet enabled. llvm-svn: 73381
* Add a ARM specific pre-allocation pass that re-schedule loads / stores fromEvan Cheng2009-06-131-22/+314
| | | | | | | | | | | consecutive addresses togther. This makes it easier for the post-allocation pass to form ldm / stm. This is step 1. We are still missing a lot of ldm / stm opportunities because of register allocation are not done in the desired order. More enhancements coming. llvm-svn: 73291
* Changing allocation ordering from r3 ... r0 back to r0 ... r3. The order ↵Evan Cheng2009-06-051-5/+5
| | | | | | change no longer make sense after the coalescing changes we have made since then. llvm-svn: 72955
* When merging multiple load / store instructions. Use the DebugLoc of the ↵Evan Cheng2009-06-051-11/+16
| | | | | | first one. llvm-svn: 72952
* Code clean up: return vector by reference rather than by value. No ↵Evan Cheng2009-06-051-21/+21
| | | | | | functionality changes. llvm-svn: 72950
* Re-apply 72756 with fixes. One of those was introduced by we changed ↵Evan Cheng2009-06-041-1/+8
| | | | | | MachineInstrBuilder::addReg() interface. llvm-svn: 72826
* Temporarily revert 72756 for now.Evan Cheng2009-06-031-7/+0
| | | | llvm-svn: 72757
* Fold preceding / trailing base inc / dec into the single load / store as well.Evan Cheng2009-06-031-2/+9
| | | | llvm-svn: 72756
* Change MachineInstrBuilder::addReg() to take a flag instead of a list ofBill Wendling2009-05-131-9/+10
| | | | | | | | | | | | booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). llvm-svn: 71722
* Remove refs to non-DebugLoc versions of BuildMI from ARM.Dale Johannesen2009-02-131-7/+13
| | | | llvm-svn: 64429
OpenPOWER on IntegriCloud