summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remember to clear the shadow kill flag at the same time as clearing the realJakob Stoklund Olesen2010-08-301-0/+1
| | | | | | | | | | | kill flag. This could cause duplicate kill flags when the same register was used twice in a continuous sequence of STRs. There is no small test case. <rdar://problem/8218046> llvm-svn: 112534
* When merging Thumb2 loads/stores, do not give up when the offset is one ofBob Wilson2010-08-271-10/+7
| | | | | | | | the special values that for ARM would be used with IB or DA modes. Fall through and consider materializing a new base address is it would be profitable. llvm-svn: 112329
* Change ARM VFP VLDM/VSTM instructions to use addressing mode #4, just likeBob Wilson2010-08-271-77/+41
| | | | | | | | | | | | | | | | | | | all the other LDM/STM instructions. This fixes asm printer crashes when compiling with -O0. I've changed one of the NEON tests (vst3.ll) to run with -O0 to check this in the future. Prior to this change VLDM/VSTM used addressing mode #5, but not really. The offset field was used to hold a count of the number of registers being loaded or stored, and the AM5 opcode field was expanded to specify the IA or DB mode, instead of the standard ADD/SUB specifier. Much of the backend was not aware of these special cases. The crashes occured when rewriting a frameindex caused the AM5 offset field to be changed so that it did not have a valid submode. I don't know exactly what changed to expose this now. Maybe we've never done much with -O0 and NEON. Regardless, there's no longer any reason to keep a count of the VLDM/VSTM registers, so we can use addressing mode #4 and clean things up in a lot of places. llvm-svn: 112322
* Unsigned value cannot be < 0.Bob Wilson2010-08-271-2/+2
| | | | llvm-svn: 112300
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-2/+2
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-2/+2
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* When no memoperands are present, assume unaligned, volatile.Jakob Stoklund Olesen2010-06-291-10/+13
| | | | llvm-svn: 107114
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-12/+12
| | | | llvm-svn: 106542
* Fix PR7421: bug in kill transferring logic. It was ignoring loads / stores ↵Evan Cheng2010-06-211-39/+66
| | | | | | which have already been processed. llvm-svn: 106481
* Make sure to skip dbg_value instructions when finding an insertion point forJim Grosbach2010-06-151-1/+2
| | | | | | the combined load/store instruction. rdar://7797940 llvm-svn: 105982
* be slightly more subtle about skipping dbg_value instructions; otherwise, if aJim Grosbach2010-06-091-5/+6
| | | | | | | | dbg_value immediately follows a sequence of ldr/str instructions that should be combined into an ldm/stm and is the last instruction in the block, then combine may end up being skipped. llvm-svn: 105758
* fix copy/paste/modify think-oJim Grosbach2010-06-081-1/+1
| | | | llvm-svn: 105653
* Another fix to prevent debug info from affecting codegen. rdar://7797940Jim Grosbach2010-06-041-0/+4
| | | | llvm-svn: 105470
* more dbg_value adjustments so debug info doesn't affect codegenJim Grosbach2010-06-041-2/+4
| | | | llvm-svn: 105454
* fix typoJim Grosbach2010-06-041-1/+1
| | | | llvm-svn: 105441
* Teach the ARM load-store optimizer to deal with dbg_value instructions.Jim Grosbach2010-06-031-4/+16
| | | | llvm-svn: 105427
* Clean up 80 column violations. No functional change.Jim Grosbach2010-06-021-2/+2
| | | | llvm-svn: 105350
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101342
* vldm/vstm can only do up to 16 double-word registers at a time.Jim Grosbach2010-03-261-1/+5
| | | | | | Radar 7797856 llvm-svn: 99630
* pr6652: Use LDM to restore PC to the return address on ARMv4.Bob Wilson2010-03-201-6/+11
| | | | | | Patch by John Tytgat! llvm-svn: 99096
* Remove redundant writeback flag in ARM addressing mode 5.Bob Wilson2010-03-161-4/+3
| | | | llvm-svn: 98648
* Remove the writeback flag from ARM's address mode 4. Now that we have separateBob Wilson2010-03-161-2/+1
| | | | | | instructions for ld/st with writeback, the flag is completely redundant. llvm-svn: 98643
* Wrap a long line and add some parens to be consistent.Bob Wilson2010-03-161-2/+3
| | | | llvm-svn: 98596
* Change ARM ld/st multiple instructions to have variant instructions forBob Wilson2010-03-131-84/+99
| | | | | | | | | | | | | | | writebacks to the address register. This gets rid of the hack that the first register on the list was the magic writeback register operand. There was an implicit constraint that if that operand was not reg0 it had to match the base register operand. The post-RA scheduler's antidependency breaker did not understand that constraint and sometimes changed one without the other. This also fixes Radar 7495976 and should help the verifier work better for ARM code. There are now new ld/st instructions explicit writeback operands and explicit constraints that tie those registers together. llvm-svn: 98409
* Combine the code to build VLDM and VSTM instructions, since they areBob Wilson2010-03-131-16/+14
| | | | | | mostly the same. llvm-svn: 98402
* Tidy up. No functional changes.Bob Wilson2010-03-121-15/+16
| | | | llvm-svn: 98398
* pr6480: Don't try producing ld/st-multiple instructions when the address isBob Wilson2010-03-041-0/+5
| | | | | | | | an undef value. This is only going to come up for bugpoint-reduced tests -- correct programs will not access memory at undefined addresses -- so it's not worth the effort of doing anything more aggressive. llvm-svn: 97745
* Stay away from str <undef> in ARMLoadStoreOpt. This pass does not understandJakob Stoklund Olesen2010-02-241-1/+9
| | | | | | | <undef> operands, and can cause scavenger failures when it translates <kill,undef> to <kill>. llvm-svn: 97046
* Load / store multiple instructions cannot load / store sp. Sorry, can't come ↵Evan Cheng2010-02-121-1/+2
| | | | | | up with a reasonable test case. llvm-svn: 96023
* Don't fold insufficiently aligned ldr/str into ldm/stm instructions.Jakob Stoklund Olesen2010-01-141-0/+12
| | | | | | | | | | | | | An unaligned ldr causes a trap, and is then emulated by the kernel with awesome performance. The darwin kernel does not emulate unaligned ldm/stm Thumb2 instructions, so don't generate them. This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2. Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably also a bad idea, but that is beyond the scope of this patch. llvm-svn: 93393
* 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
OpenPOWER on IntegriCloud