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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 23583054: Revert (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « 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 27672)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -382,7 +382,8 @@
class CallSiteInliner : public ValueObject {
public:
- explicit CallSiteInliner(FlowGraph* flow_graph)
+ CallSiteInliner(FlowGraph* flow_graph,
+ GrowableArray<const Field*>* guarded_fields)
: caller_graph_(flow_graph),
inlined_(false),
initial_size_(flow_graph->InstructionCount()),
@@ -390,7 +391,8 @@
inlining_depth_(1),
collected_call_sites_(NULL),
inlining_call_sites_(NULL),
- function_cache_() { }
+ function_cache_(),
+ guarded_fields_(guarded_fields) { }
FlowGraph* caller_graph() const { return caller_graph_; }
@@ -542,11 +544,9 @@
// Build the callee graph.
InlineExitCollector* exit_collector =
new InlineExitCollector(caller_graph_, call);
- GrowableArray<const Field*> inlined_guarded_fields;
FlowGraphBuilder builder(parsed_function,
ic_data_array,
exit_collector,
- &inlined_guarded_fields,
Isolate::kNoDeoptId);
builder.SetInitialBlockId(caller_graph_->max_block_id());
FlowGraph* callee_graph;
@@ -607,7 +607,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());
}
@@ -668,13 +668,6 @@
call_data->callee_graph = callee_graph;
call_data->parameter_stubs = param_stubs;
call_data->exit_collector = exit_collector;
-
- // When inlined, we add the guarded fields of the callee to the caller's
- // list of guarded fields.
- for (intptr_t i = 0; i < inlined_guarded_fields.length(); ++i) {
- caller_graph_->builder().AddToGuardedFields(*inlined_guarded_fields[i]);
- }
-
TRACE_INLINING(OS::Print(" Success\n"));
return true;
} else {
@@ -1005,6 +998,7 @@
CallSites* collected_call_sites_;
CallSites* inlining_call_sites_;
GrowableArray<ParsedFunction*> function_cache_;
+ GrowableArray<const Field*>* guarded_fields_;
DISALLOW_COPY_AND_ASSIGN(CallSiteInliner);
};
@@ -1159,7 +1153,8 @@
bool PolymorphicInliner::TryInlineRecognizedMethod(const Function& target) {
- FlowGraphOptimizer optimizer(owner_->caller_graph());
+ FlowGraphOptimizer optimizer(owner_->caller_graph(),
+ NULL); // No guarded fields needed.
TargetEntryInstr* entry;
Definition* last;
if (optimizer.TryInlineRecognizedMethod(target,
@@ -1480,7 +1475,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