Have a way for a target to opt-out of target-independent fast isel
authorMichael Ilseman <milseman@apple.com>
Tue, 26 Feb 2013 23:15:23 +0000 (23:15 +0000)
committerMichael Ilseman <milseman@apple.com>
Tue, 26 Feb 2013 23:15:23 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176136 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/FastISel.cpp

index 705db7e6434090a7a9baa7bbeaa4e38910617e23..57273d8b8130e2695e254ef2c6114298faffd58e 100644 (file)
@@ -372,6 +372,11 @@ protected:
     return 0;
   }
 
+  /// Whether we should skip target-independent fast-isel
+  virtual bool SkipTargetIndependentFastISel() {
+    return false;
+  }
+
 private:
   bool SelectBinaryOp(const User *I, unsigned ISDOpcode);
 
index 04f5b32e0421900565a67177da8c9b4cedcb1c9b..ff9b2ba542a0f69462ee5db0f559a33ccc3ed251 100644 (file)
@@ -822,7 +822,7 @@ FastISel::SelectInstruction(const Instruction *I) {
   }
 
   // First, try doing target-independent selection.
-  if (SelectOperator(I, I->getOpcode())) {
+  if (!SkipTargetIndependentFastISel() && SelectOperator(I, I->getOpcode())) {
     ++NumFastIselSuccessIndependent;
     DL = DebugLoc();
     return true;