summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-10-11 20:05:22 +0000
committerEric Christopher <echristo@apple.com>2010-10-11 20:05:22 +0000
commit5501b7e8057c7f54d3cf49e51421264ff646b269 (patch)
treea785bd37ef830cba3bc35f7822a201d5ce93bfe5 /llvm/lib/Target/ARM/ARMFastISel.cpp
parent279362dd5a9b53a539275ff91d25237a4f8dd2e5 (diff)
downloadbcm5719-llvm-5501b7e8057c7f54d3cf49e51421264ff646b269.tar.gz
bcm5719-llvm-5501b7e8057c7f54d3cf49e51421264ff646b269.zip
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. llvm-svn: 116217
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index a7ca18e8c5e..f290bacf915 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -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 @@ bool ARMFastISel::TargetSelectInstruction(const Instruction *I) {
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;
}
}
OpenPOWER on IntegriCloud