[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
This commit is contained in:
Oliver Stannard 2015-09-23 09:19:54 +00:00
parent 9cb018b6b6
commit f2ed5c68d2
1 changed files with 10 additions and 0 deletions

View File

@ -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;