Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: src/compiler/schedule.h

Issue 602643002: Improve memory usage in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/graph-inl.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/schedule.h
diff --git a/src/compiler/schedule.h b/src/compiler/schedule.h
index 070691e4c6e8af7d6293875bae714abfeead9cb9..0ea499cf15f8b096fca89f39300431f917f415b6 100644
--- a/src/compiler/schedule.h
+++ b/src/compiler/schedule.h
@@ -155,7 +155,7 @@ typedef BasicBlockVector::reverse_iterator BasicBlockVectorRIter;
// by the graph's dependencies. A schedule is required to generate code.
class Schedule : public GenericGraph<BasicBlock> {
public:
- explicit Schedule(Zone* zone)
+ explicit Schedule(Zone* zone, size_t node_count_hint = 0)
: GenericGraph<BasicBlock>(zone),
zone_(zone),
all_blocks_(zone),
@@ -163,6 +163,7 @@ class Schedule : public GenericGraph<BasicBlock> {
rpo_order_(zone) {
SetStart(NewBasicBlock()); // entry.
SetEnd(NewBasicBlock()); // exit.
+ nodeid_to_block_.reserve(node_count_hint);
}
// Return the block which contains {node}, if any.
« no previous file with comments | « src/compiler/graph-inl.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698