diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-28 23:21:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-28 23:21:34 +0000 |
commit | d58f3e36d081ed5b618987ff355941712d7e1f08 (patch) | |
tree | bb20ef2e48b75d940b509ca8a6cdc9349adae597 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 95d77f546604be911e051a53fc47417932b9e5e1 (diff) | |
download | bcm5719-llvm-d58f3e36d081ed5b618987ff355941712d7e1f08.tar.gz bcm5719-llvm-d58f3e36d081ed5b618987ff355941712d7e1f08.zip |
Add a target callback for FastISel.
llvm-svn: 55512
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f2246cac2c7..9b982f4fb4a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -5757,10 +5757,15 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) { Begin = F->SelectInstructions(Begin, End, FuncInfo->ValueMap, FuncInfo->MBBMap, BB); + // If the "fast" selector selected the entire block, we're done. if (Begin == End) - // The "fast" selector selected the entire block, so we're done. break; + // Next, try calling the target to attempt to handle the instruction. + if (F->TargetSelectInstruction(Begin, FuncInfo->ValueMap, + FuncInfo->MBBMap, BB)) + continue; + // Handle certain instructions as single-LLVM-Instruction blocks. if (isa<CallInst>(Begin) || isa<LoadInst>(Begin) || isa<StoreInst>(Begin)) { @@ -5783,7 +5788,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) { // The "fast" selector couldn't handle something and bailed. // For the purpose of debugging, just abort. #ifndef NDEBUG - Begin->dump(); + Begin->dump(); #endif assert(0 && "FastISel didn't select the entire block"); } |