summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2013-05-17 23:49:01 +0000
committerJF Bastien <jfb@google.com>2013-05-17 23:49:01 +0000
commit97b08c404cb702c0c3d1c1beea58576245e80698 (patch)
tree66be4481c888bea397ce3306dbba275d94ad6e99 /llvm/lib/Target/ARM/ARMSubtarget.h
parent5a9c4fe2723eff2bc89acac30662b621484eb019 (diff)
downloadbcm5719-llvm-97b08c404cb702c0c3d1c1beea58576245e80698.tar.gz
bcm5719-llvm-97b08c404cb702c0c3d1c1beea58576245e80698.zip
Support unaligned load/store on more ARM targets
This patch matches GCC behavior: the code used to only allow unaligned load/store on ARM for v6+ Darwin, it will now allow unaligned load/store for v6+ Darwin as well as for v7+ on Linux and NaCl. The distinction is made because v6 doesn't guarantee support (but LLVM assumes that Apple controls hardware+kernel and therefore have conformant v6 CPUs), whereas v7 does provide this guarantee (and Linux/NaCl behave sanely). The patch keeps the -arm-strict-align command line option, and adds -arm-no-strict-align. They behave similarly to GCC's -mstrict-align and -mnostrict-align. I originally encountered this discrepancy in FastIsel tests which expect unaligned load/store generation. Overall this should slightly improve performance in most cases because of reduced I$ pressure. llvm-svn: 182175
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index 038eb76ae1d..d01316511c4 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/lib/Target/ARM/ARMSubtarget.h
@@ -270,9 +270,8 @@ public:
bool isTargetIOS() const { return TargetTriple.getOS() == Triple::IOS; }
bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
- bool isTargetNaCl() const {
- return TargetTriple.getOS() == Triple::NaCl;
- }
+ bool isTargetNaCl() const { return TargetTriple.getOS() == Triple::NaCl; }
+ bool isTargetLinux() const { return TargetTriple.getOS() == Triple::Linux; }
bool isTargetELF() const { return !isTargetDarwin(); }
bool isAPCS_ABI() const { return TargetABI == ARM_ABI_APCS; }
OpenPOWER on IntegriCloud