[llvm-commits] [llvm] r116217 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Eric Christopher echristo at apple.com
Mon Oct 11 13:05:22 PDT 2010


Author: echristo
Date: Mon Oct 11 15:05:22 2010
New Revision: 116217

URL: http://llvm.org/viewvc/llvm-project?rev=116217&view=rev
Log:
Change flag from Enable to Disable since we're enabled by default.
Also don't use fast-isel on non-darwin since it's untested.

Modified:
    llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=116217&r1=116216&r2=116217&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Oct 11 15:05:22 2010
@@ -46,9 +46,9 @@
 using namespace llvm;
 
 static cl::opt<bool>
-EnableARMFastISel("arm-fast-isel",
-                  cl::desc("Turn on experimental ARM fast-isel support"),
-                  cl::init(true), cl::Hidden);
+DisableARMFastISel("disable-arm-fast-isel",
+                    cl::desc("Turn on experimental ARM fast-isel support"),
+                    cl::init(false), cl::Hidden);
 
 namespace {
 
@@ -1555,7 +1555,11 @@
 
 namespace llvm {
   llvm::FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo) {
-    if (EnableARMFastISel) return new ARMFastISel(funcInfo);
+    // Completely untested on non-darwin.
+    const TargetMachine &TM = funcInfo.MF->getTarget();
+    const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
+    if (Subtarget->isTargetDarwin() && !DisableARMFastISel)
+      return new ARMFastISel(funcInfo);
     return 0;
   }
 }





More information about the llvm-commits mailing list