diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-08-08 07:27:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-08-08 07:27:28 +0000 |
commit | 38aa7de6e9b503d3ed9e2196b8bdb3d8819eefdc (patch) | |
tree | e79c6b1d085bf6f4f2890a576f58e1b2aab99afc /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 248559aaa59640af7fe9eb168bd6448ec713229b (diff) | |
download | bcm5719-llvm-38aa7de6e9b503d3ed9e2196b8bdb3d8819eefdc.tar.gz bcm5719-llvm-38aa7de6e9b503d3ed9e2196b8bdb3d8819eefdc.zip |
Add skeleton of simple basic block instruction selector.
llvm-svn: 54522
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ac30ff63b70..d1c49d00eed 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -12,10 +12,10 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "isel" +#include "llvm/CodeGen/SelectionDAGISel.h" +#include "SimpleBBISel.h" #include "llvm/ADT/BitVector.h" #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/SelectionDAGISel.h" -#include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/Constants.h" #include "llvm/CallingConv.h" #include "llvm/DerivedTypes.h" @@ -33,6 +33,7 @@ #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/SchedulerRegistry.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Target/TargetRegisterInfo.h" @@ -5441,11 +5442,14 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, // each basic block. NodeAllocatorType NodeAllocator; + SimpleBBISel SISel(MF, TLI); std::vector<std::pair<MachineInstr*, unsigned> > PHINodesToUpdate; for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) { BasicBlock *LLVMBB = &*I; PHINodesToUpdate.clear(); - SelectBasicBlock(LLVMBB, MF, FuncInfo, PHINodesToUpdate, NodeAllocator); + + if (!FastISel || !SISel.SelectBasicBlock(LLVMBB, FuncInfo.MBBMap[LLVMBB])) + SelectBasicBlock(LLVMBB, MF, FuncInfo, PHINodesToUpdate, NodeAllocator); FinishBasicBlock(LLVMBB, MF, FuncInfo, PHINodesToUpdate, NodeAllocator); } } |