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 | 79ce276083ced01256a0eb7d80731e4948ca6e87 (patch) | |
tree | b8ca5d82fd79edad2fa840c1cfdd039e08ca4466 /lib/CodeGen/ScheduleDAGPrinter.cpp | |
parent | 6ad2b2a3d20c667e01535fed4bc7f4753aa6fc85 (diff) | |
download | llvm-79ce276083ced01256a0eb7d80731e4948ca6e87.tar.gz llvm-79ce276083ced01256a0eb7d80731e4948ca6e87.tar.bz2 llvm-79ce276083ced01256a0eb7d80731e4948ca6e87.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGPrinter.cpp')
-rw-r--r-- | lib/CodeGen/ScheduleDAGPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/ScheduleDAGPrinter.cpp b/lib/CodeGen/ScheduleDAGPrinter.cpp index 2553960457..e2ae5a03c1 100644 --- a/lib/CodeGen/ScheduleDAGPrinter.cpp +++ b/lib/CodeGen/ScheduleDAGPrinter.cpp @@ -34,7 +34,7 @@ namespace llvm { template<> struct DOTGraphTraits<ScheduleDAG*> : public DefaultDOTGraphTraits { static std::string getGraphName(const ScheduleDAG *G) { - return G->MF->getFunction()->getName(); + return G->MF.getFunction()->getName(); } static bool renderGraphFromBottomUp() { @@ -83,8 +83,8 @@ std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU, void ScheduleDAG::viewGraph() { // This code is only for debugging! #ifndef NDEBUG - ViewGraph(this, "dag." + MF->getFunction()->getName(), - "Scheduling-Units Graph for " + MF->getFunction()->getName() + ':' + + ViewGraph(this, "dag." + MF.getFunction()->getName(), + "Scheduling-Units Graph for " + MF.getFunction()->getName() + ':' + BB->getBasicBlock()->getName()); #else cerr << "ScheduleDAG::viewGraph is only available in debug builds on " |