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

Unified Diff: runtime/vm/compiler.cc

Issue 817823002: Add inlining ranges/intervals to code objects so that we can map a pc to the inlined stack. The map… (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 | « no previous file | runtime/vm/disassembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 42521)
+++ runtime/vm/compiler.cc (working copy)
@@ -456,6 +456,10 @@
}
}
+ // Maps inline_id_to_function[inline_id] -> function. Top scope
+ // function has inline_id 0. The map is populated by the inliner.
+ GrowableArray<const Function*> inline_id_to_function;
+ inline_id_to_function.Add(&function);
// Collect all instance fields that are loaded in the graph and
// have non-generic type feedback attached to them that can
// potentially affect optimizations.
@@ -473,6 +477,8 @@
optimizer.TryOptimizePatterns();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
+ FlowGraphInliner::SetInliningId(*flow_graph, 0);
+
// Inlining (mutates the flow graph)
if (FLAG_use_inlining) {
TimerScope timer(FLAG_compiler_stats,
@@ -485,7 +491,7 @@
optimizer.ApplyClassIds();
DEBUG_ASSERT(flow_graph->VerifyUseLists());
- FlowGraphInliner inliner(flow_graph);
+ FlowGraphInliner inliner(flow_graph, &inline_id_to_function);
inliner.Inline();
// Use lists are maintained and validated by the inliner.
DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -679,7 +685,8 @@
}
Assembler assembler(use_far_branches);
- FlowGraphCompiler graph_compiler(&assembler, flow_graph, optimized);
+ FlowGraphCompiler graph_compiler(
+ &assembler, flow_graph, optimized, inline_id_to_function);
{
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphcompiler_timer,
@@ -694,6 +701,7 @@
const Code& code = Code::Handle(
Code::FinalizeCode(function, &assembler, optimized));
code.set_is_optimized(optimized);
+ code.set_inlined_intervals(graph_compiler.inlined_code_intervals());
graph_compiler.FinalizePcDescriptors(code);
graph_compiler.FinalizeDeoptInfo(code);
graph_compiler.FinalizeStackmaps(code);
« no previous file with comments | « no previous file | runtime/vm/disassembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698