[PATCH] D13007: [ARM] Add option to force fast-isel

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 03:27:21 PDT 2015

olista01 created this revision.
olista01 added a reviewer: echristo.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.

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.




Index: lib/Target/ARM/ARMSubtarget.cpp
--- lib/Target/ARM/ARMSubtarget.cpp
+++ lib/Target/ARM/ARMSubtarget.cpp
@@ -60,6 +60,12 @@
                          "Allow IT blocks based on ARMv7"),
+/// ForceFastISel - Use the fast-isel, even for subtargets where it is not
+/// currently supported (for testing only).
+static cl::opt<bool>
+               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::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;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13007.35220.patch
Type: text/x-patch
Size: 1024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150921/884613a0/attachment.bin>

More information about the llvm-commits mailing list