summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.cpp
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2015-09-23 09:19:54 +0000
committerOliver Stannard <oliver.stannard@arm.com>2015-09-23 09:19:54 +0000
commitf2ed5c68d2c44588e7059212589de328768bf7c6 (patch)
tree0260a4b0df05e51e93994745ed845d6776e12de2 /llvm/lib/Target/ARM/ARMSubtarget.cpp
parent9cb018b6b66ceb2ae999d4f4c5e299d3062cb9d6 (diff)
downloadbcm5719-llvm-f2ed5c68d2c44588e7059212589de328768bf7c6.tar.gz
bcm5719-llvm-f2ed5c68d2c44588e7059212589de328768bf7c6.zip
[ARM] Add option to force fast-isel
The ARM backend has some logic that only allows the fast-isel to be enabled for subtargets where it is known to be stable. This adds a backend option to override this and force the fast-isel to be used for any target, to allow it to be tested. This is an ARM-specific option, because no other backend disables the fast-isel on a per-subtarget basis. llvm-svn: 248369
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index 56ce171e4ca..0b070710c12 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -60,6 +60,12 @@ IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT),
"Allow IT blocks based on ARMv7"),
clEnumValEnd));
+/// ForceFastISel - Use the fast-isel, even for subtargets where it is not
+/// currently supported (for testing only).
+static cl::opt<bool>
+ForceFastISel("arm-force-fast-isel",
+ cl::init(false), cl::Hidden);
+
/// initializeSubtargetDependencies - Initializes using a CPU and feature string
/// so that we can use initializer lists for subtarget initialization.
ARMSubtarget &ARMSubtarget::initializeSubtargetDependencies(StringRef CPU,
@@ -298,6 +304,10 @@ bool ARMSubtarget::useMovt(const MachineFunction &MF) const {
}
bool ARMSubtarget::useFastISel() const {
+ // Enable fast-isel for any target, for testing only.
+ if (ForceFastISel)
+ return true;
+
// Limit fast-isel to the targets that are or have been tested.
if (!hasV6Ops())
return false;
OpenPOWER on IntegriCloud