From 425f047fd1a1c22ef975a19b72a9c3d681c1dd0d Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 23 Sep 2015 09:19:54 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248369 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMSubtarget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 56ce171e4ca..0b070710c12 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/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 +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; -- 2.34.1