diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2013-11-13 18:29:49 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2013-11-13 18:29:49 +0000 |
commit | 929bdb23794b615dc6b0cc59db21f0450c3ce33b (patch) | |
tree | 97508fba5c848580476e3e9edfdc7cfd570ce52f /lib/Target/ARM/ARMSubtarget.h | |
parent | e258845a63aa72c4a13f939af05a230f2720f637 (diff) | |
download | llvm-929bdb23794b615dc6b0cc59db21f0450c3ce33b.tar.gz llvm-929bdb23794b615dc6b0cc59db21f0450c3ce33b.tar.bz2 llvm-929bdb23794b615dc6b0cc59db21f0450c3ce33b.tar.xz |
Enable generating legacy IT block for AArch32
By default, the behavior of IT block generation will be determinated
dynamically base on the arch (armv8 vs armv7). This patch adds backend
options: -arm-restrict-it and -arm-no-restrict-it. The former one
restricts the generation of IT blocks (the same behavior as thumbv8) for
both arches. The later one allows the generation of legacy IT block (the
same behavior as ARMv7 Thumb2) for both arches.
Clang will support -mrestrict-it and -mno-restrict-it, which is
compatible with GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index aab93f1d6c..5276901bbb 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -177,6 +177,10 @@ protected: /// ARMTargetLowering::allowsUnalignedMemoryAccesses(). bool AllowsUnalignedMem; + /// RestrictIT - If true, the subtarget disallows generation of deprecated IT + /// blocks to conform to ARMv8 rule. + bool RestrictIT; + /// Thumb2DSP - If true, the subtarget supports the v7 DSP (saturating arith /// and such) instructions in Thumb2 code. bool Thumb2DSP; @@ -327,6 +331,8 @@ public: bool allowsUnalignedMem() const { return AllowsUnalignedMem; } + bool restrictIT() const { return RestrictIT; } + const std::string & getCPUString() const { return CPUString; } unsigned getMispredictionPenalty() const; |