diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-15 19:20:50 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-15 19:20:50 +0000 |
commit | 619ef48a5211ac7540dd32df4f3b4392c0b6aaa4 (patch) | |
tree | 72b8ec060e856b84b9cca3c57f5708d304480a4a /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | |
parent | e53c036d85e9b504fa1af62223999777f30c942b (diff) | |
download | bcm5719-llvm-619ef48a5211ac7540dd32df4f3b4392c0b6aaa4.tar.gz bcm5719-llvm-619ef48a5211ac7540dd32df4f3b4392c0b6aaa4.zip |
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.
To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.
llvm-svn: 62275
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp index b86492992c4..5154fb1d3e9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp @@ -14,9 +14,9 @@ #define DEBUG_TYPE "pre-RA-sched" #include "llvm/CodeGen/ScheduleDAGSDNodes.h" #include "llvm/CodeGen/SchedulerRegistry.h" +#include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" @@ -71,9 +71,8 @@ private: std::vector<unsigned> LiveRegCycles; public: - ScheduleDAGFast(SelectionDAG *dag, MachineBasicBlock *bb, - const TargetMachine &tm) - : ScheduleDAGSDNodes(dag, bb, tm) {} + ScheduleDAGFast(MachineFunction &mf) + : ScheduleDAGSDNodes(mf) {} void Schedule(); @@ -619,9 +618,6 @@ void ScheduleDAGFast::ListScheduleBottomUp() { // Public Constructor Functions //===----------------------------------------------------------------------===// -llvm::ScheduleDAG* llvm::createFastDAGScheduler(SelectionDAGISel *IS, - SelectionDAG *DAG, - const TargetMachine *TM, - MachineBasicBlock *BB, bool) { - return new ScheduleDAGFast(DAG, BB, *TM); +llvm::ScheduleDAG* llvm::createFastDAGScheduler(SelectionDAGISel *IS, bool) { + return new ScheduleDAGFast(*IS->MF); } |