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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 13726023: Restore r20998 with a bug fix: add field to guarded_fields_ when it contains relevant cid. Was miss… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « runtime/vm/flow_graph_inliner.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
===================================================================
--- runtime/vm/flow_graph_inliner.cc (revision 21001)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -292,7 +292,7 @@
class CallSiteInliner : public ValueObject {
public:
- explicit CallSiteInliner(FlowGraph* flow_graph)
+ CallSiteInliner(FlowGraph* flow_graph, GrowableArray<Field*>* guarded_fields)
: caller_graph_(flow_graph),
inlined_(false),
initial_size_(flow_graph->InstructionCount()),
@@ -300,7 +300,8 @@
inlining_depth_(1),
collected_call_sites_(NULL),
inlining_call_sites_(NULL),
- function_cache_() { }
+ function_cache_(),
+ guarded_fields_(guarded_fields) { }
// Inlining heuristics based on Cooper et al. 2008.
bool ShouldWeInline(intptr_t instr_count,
@@ -501,7 +502,7 @@
&CompilerStats::graphinliner_opt_timer,
isolate);
// TODO(zerny): Do more optimization passes on the callee graph.
- FlowGraphOptimizer optimizer(callee_graph);
+ FlowGraphOptimizer optimizer(callee_graph, guarded_fields_);
optimizer.ApplyICData();
DEBUG_ASSERT(callee_graph->VerifyUseLists());
}
@@ -834,6 +835,7 @@
CallSites* collected_call_sites_;
CallSites* inlining_call_sites_;
GrowableArray<ParsedFunction*> function_cache_;
+ GrowableArray<Field*>* guarded_fields_;
DISALLOW_COPY_AND_ASSIGN(CallSiteInliner);
};
@@ -874,7 +876,7 @@
printer.PrintBlocks();
}
- CallSiteInliner inliner(flow_graph_);
+ CallSiteInliner inliner(flow_graph_, guarded_fields_);
inliner.InlineCalls();
if (inliner.inlined()) {
« no previous file with comments | « runtime/vm/flow_graph_inliner.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698