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

Issue 10911004: Reapply "Inlining of static calls with trivial function bodies." (Closed)

Created:
8 years, 3 months ago by zerny-google
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Reapply "Inlining of static calls with trivial function bodies." Reapply r11579 with a bug fix. Original review at https://chromiumcodereview.appspot.com/10919004 R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=11586

Patch Set 1 #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+439 lines, -5 lines) Patch
M runtime/vm/compiler.cc View 3 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph.h View 3 chunks +12 lines, -1 line 2 comments Download
M runtime/vm/flow_graph.cc View 4 chunks +71 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 5 chunks +26 lines, -0 lines 6 comments Download
M runtime/vm/flow_graph_builder.cc View 70 chunks +103 lines, -2 lines 2 comments Download
A runtime/vm/flow_graph_inliner.h View 1 chunk +29 lines, -0 lines 0 comments Download
A runtime/vm/flow_graph_inliner.cc View 1 chunk +184 lines, -0 lines 4 comments Download
M runtime/vm/intermediate_language.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
zerny-google
8 years, 3 months ago (2012-08-30 08:52:41 UTC) #1
Kevin Millikin (Google)
LGTM.
8 years, 3 months ago (2012-08-30 08:54:28 UTC) #2
srdjan
DBC. https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph.h File runtime/vm/flow_graph.h (right): https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph.h#newcode72 runtime/vm/flow_graph.h:72: void ComputeSSA(intptr_t next_virtual_register_number = 0); Avoid using default ...
8 years, 3 months ago (2012-09-05 17:40:05 UTC) #3
zerny-google
8 years, 3 months ago (2012-09-07 14:08:43 UTC) #4
Hi Srdjan, below are answers to your comments and questions. I'll be gone next
week so Kevin will land the actual changes.

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph.h
File runtime/vm/flow_graph.h (right):

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph....
runtime/vm/flow_graph.h:72: void ComputeSSA(intptr_t
next_virtual_register_number = 0);
On 2012/09/05 17:40:05, srdjan wrote:
> Avoid using default arguments. There is only one call site where you have to
> specify 0.

Done. (In next CL for inlining monomorphic calls.)

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_builder.cc (right):

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.cc:2504: FlowGraph*
FlowGraphBuilder::BuildGraphForInlining(InliningContext context) {
On 2012/09/05 17:40:05, srdjan wrote:
> You may want to print the AST if you have succeeded with building graph for
> inlining (with appropriate preamble)

That is done in flow_graph_inliner.cc after it has been built, ssa transformed
and linked in the existing graph.

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_builder.h (right):

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.h:28: kTestContext
On 2012/09/05 17:40:05, srdjan wrote:
> Why is this needed? From code it seems that you only need to check if you are
> inlining or not.

We will need it to specialize inlining calls in a test context.

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.h:62: if (InInliningContext()) {
On 2012/09/05 17:40:05, srdjan wrote:
> Why not check for exits_ != NULL instead?

The exits array might make sense outside an inlining context.

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.h:158: // actually added to the graph.
On 2012/09/05 17:40:05, srdjan wrote:
> The comment is not clear, please revise. Maybe describe it in context of
> inlining? If needed we can chat tomorrow ( I am in CET  time zone).

Could you clarify this Kevin?

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_inliner.cc (right):

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_inliner.cc:17: DEFINE_FLAG(bool, trace_inlining, false,
"Trace inlining");
On 2012/09/05 17:40:05, srdjan wrote:
> I would like to trace only inlined functions. Maybe incorporate it in
> FLAG_trace_compiler?

Could you elaborate. I'm not sure I understand?

https://chromiumcodereview.appspot.com/10911004/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_inliner.cc:147: bool preformed_inlining() const { return
inlined_; }
On 2012/09/05 17:40:05, srdjan wrote:
> What does preformed inlining mean?

Typo there. I meant to write performed, but have changed it to just inlined(),
as in the inliner has inlined code in the graph.

Powered by Google App Engine
This is Rietveld 408576698