summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.h
Commit message (Collapse)AuthorAgeFilesLines
...
* whitespaceAndrew Trick2010-12-241-1/+1
| | | | llvm-svn: 122539
* Making use of VFP / NEON floating point multiply-accumulate / subtraction isEvan Cheng2010-12-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | difficult on current ARM implementations for a few reasons. 1. Even though a single vmla has latency that is one cycle shorter than a pair of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause additional pipeline stall. So it's frequently better to single codegen vmul + vadd. 2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to stall for 4 cycles. We need to schedule them apart. 3. A vmla followed vmla is a special case. Obvious issuing back to back RAW vmla + vmla is very bad. But this isn't ideal either: vmul vadd vmla Instead, we want to expand the second vmla: vmla vmul vadd Even with the 4 cycle vmul stall, the second sequence is still 2 cycles faster. Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough but it isn't the optimial solution. This patch attempts to make it possible to use vmla / vmls in cases where it is profitable. A. Add missing isel predicates which cause vmla to be codegen'ed. B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to compute a fmul and a fmla. C. Add additional isel checks for vmla, avoid cases where vmla is feeding into fp instructions (except for the #3 exceptional case). D. Add ARM hazard recognizer to model the vmla / vmls hazards. E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the vmla / vmls will trigger one of the special hazards. Work in progress, only A+B are enabled. llvm-svn: 120960
* Fix preload instruction isel. Only v7 supports pli, and only v7 with mp ↵Evan Cheng2010-11-031-0/+5
| | | | | | extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing. llvm-svn: 118160
* PR8359: The ARM backend may end up allocating registers D16 to D31 whenBob Wilson2010-10-121-0/+5
| | | | | | | | "-mattr=+vfp3" is specified. However, this will not work for hardware that only supports 16 registers. Add a new flag to support -"mattr=+vfp3,+d16". Patch by Jan Voung! llvm-svn: 116310
* Jim Asked us to move DataLayout on ARM back to the most specialized classes. DoRafael Espindola2010-10-031-23/+0
| | | | | | | | so and also change X86 for consistency. Investigating if this can be improved a bit. llvm-svn: 115469
* Increase ARM APCS preferred alignment for i64 and f64 from 32 bits to 64 bits.Bob Wilson2010-09-291-2/+2
| | | | | | | LDM/STM instructions can run one cycle faster on some ARM processors if the memory address is 64-bit aligned. Radar 8489376. llvm-svn: 115047
* Add a subtarget hook for reporting the misprediction penalty. Use this to ↵Owen Anderson2010-09-281-0/+2
| | | | | | | | | | | provide more precise cost modeling for if-conversion. Now if only we had a way to estimate the misprediction probability. Adjsut CodeGen/ARM/ifcvt10.ll. The pipeline on Cortex-A8 is long enough that it is still profitable to predicate an ldm, but the shorter pipeline on Cortex-A9 makes it unprofitable. llvm-svn: 114995
* Add a command line option "-arm-strict-align" to disallow unaligned memoryBob Wilson2010-09-281-0/+7
| | | | | | accesses for ARM targets that would otherwise allow it. Radar 8465431. llvm-svn: 114941
* Hard to imagine there are still people using inferior compilers.Daniel Dunbar2010-09-271-1/+1
| | | | llvm-svn: 114862
* Odd additional stub framework for the ARM MC ELF emission.Rafael Espindola2010-09-271-0/+23
| | | | | | | | | llc now recognizes the "intent" to support MC/obj emission for ARM, but given that they are all stubs, it asserts on --filetype=obj --march=arm Patch by Jason Kim. llvm-svn: 114856
* Teach if-converter to be more careful with predicating instructions that wouldEvan Cheng2010-09-101-0/+10
| | | | | | | | | | | take multiple cycles to decode. For the current if-converter clients (actually only ARM), the instructions that are predicated on false are not nops. They would still take machine cycles to decode. Micro-coded instructions such as LDM / STM can potentially take multiple cycles to decode. If-converter should take treat them as non-micro-coded simple instructions. llvm-svn: 113570
* cortex m4 has floating point support, but only single precision.Jim Grosbach2010-08-111-0/+5
| | | | llvm-svn: 110810
* Report error if codegen tries to instantiate a ARM target when the cpu does ↵Evan Cheng2010-08-111-0/+5
| | | | | | support it. e.g. cortex-m* processors. llvm-svn: 110798
* Add ARM Archv6M and let it implies FeatureDB (having dmb, etc.)Evan Cheng2010-08-111-1/+1
| | | | llvm-svn: 110795
* - Add subtarget feature -mattr=+db which determine whether an ARM cpu has theEvan Cheng2010-08-111-0/+5
| | | | | | | | | memory and synchronization barrier dmb and dsb instructions. - Change instruction names to something more sensible (matching name of actual instructions). - Added tests for memory barrier codegen. llvm-svn: 110785
* Change -prefer-32bit-thumb to attribute -mattr=+32bit instead to disable ↵Evan Cheng2010-08-091-0/+5
| | | | | | more 32-bit to 16-bit optimizations. llvm-svn: 110584
* Add an ARM "feature". Cortex-a8 fp comparison is very slow (> 20 cycles).Evan Cheng2010-07-131-0/+4
| | | | llvm-svn: 108256
* Fix "warning: extra ';' inside a struct or union" when building llvm with clangShantonu Sen2010-05-061-2/+2
| | | | llvm-svn: 103179
* Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/packJim Grosbach2010-05-051-2/+9
| | | | | | | instructions to subtarget features and update tests to reflect. PR5717. llvm-svn: 103136
* Add initial support for ARMv7M subtarget and cortex-m3 cpu. Patch byJim Grosbach2010-05-051-2/+4
| | | | | | | | | Jordy <snhjordy@gmail.com>. Followup patches will add some tests and adjust to use Subtarget features for the instructions. llvm-svn: 103119
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101334
* switch the use-vml[as] instructions flag to a subtarget 'feature'Jim Grosbach2010-03-251-4/+4
| | | | llvm-svn: 99565
* Make the use of the vmla and vmls VFP instructions controllable via cmd line.Jim Grosbach2010-03-241-0/+5
| | | | | | | Preliminary testing shows significant performance wins by not using these instructions. llvm-svn: 99436
* Add substarget feature for FP16Anton Korobeynikov2010-03-141-0/+6
| | | | llvm-svn: 98503
* Lower small memcpys to load/stores on Thumb2.Bob Wilson2010-03-111-3/+3
| | | | | | Radar 7686922. llvm-svn: 98210
* Initial bits of ARMv4-only support.Anton Korobeynikov2010-03-061-2/+2
| | | | | | Patch by John Tytgat! llvm-svn: 97886
* Remove isProfitableToDuplicateIndirectBranch target hook. It is profitableBob Wilson2009-11-301-5/+0
| | | | | | | | | for all the processors where I have tried it, and even when it might not help performance, the cost is quite low. The opportunities for duplicating indirect branches are limited by other factors so code size does not change much due to tail duplicating indirect branches aggressively. llvm-svn: 90144
* Materialize global addresses via movt/movw pair, this is always betterAnton Korobeynikov2009-11-241-1/+7
| | | | | | | | | | | | | than doing the same via constpool: 1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2. 2. Load from constpool might stall up to 300 cycles due to cache miss. 3. Movt/movw does not use load/store unit. 4. Less constpool entries => better compiler performance. This is only enabled on ELF systems, since darwin does not have needed relocations (yet). llvm-svn: 89720
* Add a target hook to allow changing the tail duplication limit based on theBob Wilson2009-11-181-0/+5
| | | | | | | | | contents of the block to be duplicated. Use this for ARM Cortex A8/9 to be more aggressive tail duplicating indirect branches, since it makes it much more likely that they will be predicted in the branch target buffer. Testcase coming soon. llvm-svn: 89187
* Allow target to specify regclass for which antideps will only be broken ↵David Goodwin2009-11-131-1/+1
| | | | | | along the critical path. llvm-svn: 88682
* Fixed to address code review. No functional changes.David Goodwin2009-11-101-8/+2
| | | | llvm-svn: 86634
* Allow targets to specify register classes whose member registers should not ↵David Goodwin2009-11-101-2/+6
| | | | | | be renamed to break anti-dependencies. llvm-svn: 86628
* Break anti-dependence breaking out into its own class.David Goodwin2009-10-261-1/+1
| | | | llvm-svn: 85127
* Allow the target to select the level of anti-dependence breaking that should ↵David Goodwin2009-10-221-1/+3
| | | | | | be performed by the post-RA scheduler. The default is none. llvm-svn: 84911
* Change createPostRAScheduler so it can be turned off at llc -O1.Evan Cheng2009-10-161-3/+5
| | | | llvm-svn: 84273
* Remove -post-RA-schedule flag and add a TargetSubtarget method to enable ↵David Goodwin2009-09-301-0/+7
| | | | | | post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8. llvm-svn: 83122
* Reference to hidden symbols do not have to go through non-lazy pointer in ↵Evan Cheng2009-09-031-1/+2
| | | | | | non-pic mode. rdar://7187172. llvm-svn: 80904
* Let Darwin linker auto-synthesize stubs and lazy-pointers. This deletes a ↵Evan Cheng2009-08-281-0/+5
| | | | | | bunch of nasty code in ARM asm printer. llvm-svn: 80404
* Whitespace cleanup. Remove trailing whitespace.Jim Grosbach2009-08-111-4/+4
| | | | llvm-svn: 78666
* By default, for cortex-a8 use NEON for single-precision FP. David Goodwin2009-08-051-1/+3
| | | | llvm-svn: 78200
* Initial support for single-precision FP using NEON. Added "neonfp" attribute ↵David Goodwin2009-08-041-1/+6
| | | | | | to enable. Added patterns for some binary FP operations. llvm-svn: 78081
* Normalize Subtarget constructors to take a target triple string instead ofDaniel Dunbar2009-08-021-3/+2
| | | | | | | | | | 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
* isThumb2 really should mean thumb2 only, not thumb2+.Evan Cheng2009-07-061-1/+1
| | | | llvm-svn: 74871
* Change the meaning of predicate hasThumb2 to mean thumb2 ISA is available, ↵Evan Cheng2009-07-021-1/+2
| | | | | | not that it's in thumb mode and thumb2 is available. Added isThumb2 predicate to replace the old predicate. llvm-svn: 74692
* Revert 74164. We'll want to use this method later.Bob Wilson2009-06-251-0/+1
| | | | llvm-svn: 74176
* Remove unused hasV6T2Ops method. We already have a separate feature toBob Wilson2009-06-251-1/+0
| | | | | | identify Thumb2. llvm-svn: 74164
* Latency information for ARM v6. It's rough and not yet hooked up. Right now ↵Evan Cheng2009-06-191-0/+8
| | | | | | we are only using branch latency to determine if-conversion limits. llvm-svn: 73747
* Remove UseThumbBacktraces. Just check if subtarget is darwin.Evan Cheng2009-06-181-4/+0
| | | | llvm-svn: 73734
* Rename methods for the sake of consistency.Anton Korobeynikov2009-06-151-2/+2
| | | | llvm-svn: 73428
* Separate V6 from V6T2 since the latter has some extra nice instructionsAnton Korobeynikov2009-06-081-1/+2
| | | | llvm-svn: 73085
OpenPOWER on IntegriCloud