diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-05 01:27:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-05 01:27:58 +0000 |
commit | 6e3ff375474c4fd78feb0b8463eb273a23cb4404 (patch) | |
tree | 3f24664a2a2050191f4a81917eec892b19cea495 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 864e2efce2cb5d02e376933933d96074723fe77c (diff) |
Make TargetSelectInstruction protected and called from FastISel.cpp
instead of SelectionDAGISel.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index c6c14016d2..4ead9c9d8c 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -532,7 +532,15 @@ bool FastISel::SelectBitCast(User *I) { bool FastISel::SelectInstruction(Instruction *I) { - return SelectOperator(I, I->getOpcode()); + // First, try doing target-independent selection. + if (SelectOperator(I, I->getOpcode())) + return true; + + // Next, try calling the target to attempt to handle the instruction. + if (TargetSelectInstruction(I)) + return true; + + return false; } /// FastEmitBranch - Emit an unconditional branch to the given block, |