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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 773183002: Enable inlining inside try-blocks in the VM's optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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_compiler.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('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 42083)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -591,15 +591,6 @@
function.ToCString(),
function.deoptimization_counter()));
- // TODO(fschneider): Enable inlining inside try-blocks.
- if (call_data->call->GetBlock()->try_index() !=
- CatchClauseNode::kInvalidTryIndex) {
- TRACE_INLINING(OS::Print(" Bailout: inside try-block\n"));
- PRINT_INLINING_TREE("Inside try-block",
- &call_data->caller, &function, call_data->call);
- return false;
- }
-
// Make a handle for the unoptimized code so that it is not disconnected
// from the function while we are trying to inline it.
const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
@@ -730,6 +721,16 @@
ASSERT(arguments->length() == function.NumParameters());
ASSERT(param_stubs->length() == callee_graph->parameter_count());
+ // Update try-index of the callee graph.
+ if (call_data->call->GetBlock()->InsideTryBlock()) {
+ intptr_t try_index = call_data->call->GetBlock()->try_index();
zerny-google 2014/12/03 13:22:27 Nit: cache the GetBlock call.
Florian Schneider 2014/12/03 13:45:43 Done.
+ for (BlockIterator it = callee_graph->reverse_postorder_iterator();
+ !it.Done(); it.Advance()) {
+ BlockEntryInstr* block = it.Current();
+ block->set_try_index(try_index);
+ }
+ }
+
BlockScheduler block_scheduler(callee_graph);
block_scheduler.AssignEdgeWeights();
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698