summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/FastISel.h5
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/FastISel.h b/llvm/include/llvm/CodeGen/FastISel.h
index 705db7e6434..57273d8b813 100644
--- a/llvm/include/llvm/CodeGen/FastISel.h
+++ b/llvm/include/llvm/CodeGen/FastISel.h
@@ -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);
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 04f5b32e042..ff9b2ba542a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -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;
OpenPOWER on IntegriCloud