diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-11-09 01:57:03 +0000 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2011-11-14 09:12:03 -0800 |
commit | 099dcdbdf31d55dfb6b45cc47d1e51fe535113ae (patch) | |
tree | 4bc89fa096bd73fc89d5b3c18843d79854facd9c /lib | |
parent | fc7b08da019fcb14f7ca3f0db77b10384809fd8b (diff) | |
download | external_llvm-099dcdbdf31d55dfb6b45cc47d1e51fe535113ae.zip external_llvm-099dcdbdf31d55dfb6b45cc47d1e51fe535113ae.tar.gz external_llvm-099dcdbdf31d55dfb6b45cc47d1e51fe535113ae.tar.bz2 |
Hide cpu name checking in ARMSubtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 2 | ||||
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index a871ed7..4c3be89 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -1080,7 +1080,7 @@ bool ARMLoadStoreOpt::FixInvalidRegPairOp(MachineBasicBlock &MBB, unsigned OddRegNum = TRI->getDwarfRegNum(OddReg, false); // ARM errata 602117: LDRD with base in list may result in incorrect base // register when interrupted or faulted. - bool Errata602117 = EvenReg == BaseReg && STI->getCPUString() == "cortex-m3"; + bool Errata602117 = EvenReg == BaseReg && STI->isCortexM3(); if (!Errata602117 && ((EvenRegNum & 1) == 0 && (EvenRegNum + 1) == OddRegNum)) return false; diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index 5e884e0..a35f450 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -191,6 +191,7 @@ protected: bool isCortexA8() const { return ARMProcFamily == CortexA8; } bool isCortexA9() const { return ARMProcFamily == CortexA9; } + bool isCortexM3() const { return CPUString == "cortex-m3"; } bool hasARMOps() const { return !NoARM; } |