Make arm fast-isel possible to enable via command line.
authorEric Christopher <echristo@apple.com>
Tue, 17 Aug 2010 00:46:57 +0000 (00:46 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 17 Aug 2010 00:46:57 +0000 (00:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111219 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index aad037a78a270aab344dfddbb19039619a783694..3679b59e328ee83d1125d9750bebdfab4d41f366 100644 (file)
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/Support/CallSite.h"
+#include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/Target/TargetOptions.h"
 using namespace llvm;
 
+static cl::opt<bool>
+EnableARMFastISel("arm-fast-isel",
+                  cl::desc("Turn on experimental ARM fast-isel support"),
+                  cl::init(false), cl::Hidden);
+
 namespace {
 
 class ARMFastISel : public FastISel {
@@ -66,7 +72,7 @@ bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
 
 namespace llvm {
   llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
-    // Turn it off for now. It's not quite ready.
+    if (EnableARMFastISel) return new ARMFastISel(funcInfo);
     return 0;
   }
 }