Commit Graph

95 Commits

Author SHA1 Message Date
kmillikin@google.com 1d0cde6f24 Fix the flag --reorder-basic-blocks so it works to disable reordering.
Temporarily set the flag to false by default to avoid a bad interaction
between block reordering and empty block compaction (dartbug.com/13101).

BUG=https://code.google.com/p/dart/issues/detail?id=13101
R=fschneider@google.com

Review URL: https://codereview.chromium.org//23523039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27292 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 14:54:45 +00:00
kmillikin@google.com 00f20f3ffc Collect edge count profiling data and reorder basic blocks.
In unoptimized code, collect edge counts for all edges.  Use the counts
to reorder basic blocks in optimized code.  Basic blocks are reordered
by using Pettis and Hansen's "Profile Guided Code Positioning" bottom-up
algorithm.

R=fschneider@google.com, regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//18111006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26773 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 09:17:07 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

Review URL: https://codereview.chromium.org//23072026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
zra@google.com fa2ad38a31 Enables per-function far-branches for ARM and MIPS.
R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//21363003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25723 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:51:46 +00:00
fschneider@google.com 8f0bff4acf Prune variables that are not live at block entry from the environment.
If a variable is not live at a block entry, replace it
with the null-constant in the environment.  This can occur
when there is a partially dead variable stores.

Fewer environment uses mean shorter live ranges and better register
allocation.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//18558008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24939 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 08:27:35 +00:00
zra@google.com 76f872967c Optimize functions containing try-catch on MIPS.
R=regis@google.com

Review URL: https://codereview.chromium.org//18243002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24616 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 23:48:13 +00:00
regis@google.com 5eb7e3b03d Optimize functions containing try-catch on ARM.
R=zra@google.com

Review URL: https://codereview.chromium.org//18223010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24615 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 23:09:34 +00:00
kmillikin@google.com 0104b48892 Fix a small bug in trace printing for discovered loops.
Loop blocks were printed with their preorder number, which is hard to
correlate to the graph.  Use the block id instead.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//17283006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24184 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 13:56:48 +00:00
kmillikin@google.com 3e78b2ad4a Reapply "Initial implementation of on-stack replacement (OSR)."
This reapplies SVN r24024 with a bugfix.

After OSR compilation, restore the pre-OSR code (which might be already
optimized) rather than the unoptimized code (which might have its entry
patched).  When the optimized code entry is patched it is only safe to call
it as a static call, not as an instance call.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//17233003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24088 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 11:05:15 +00:00
kmillikin@google.com d6f3eccdf2 Revert "Initial implementation of on-stack replacement (OSR)."
This reverts commit 24024.

TBR=fschneider@google.com

Review URL: https://codereview.chromium.org//16888013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24025 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:30:53 +00:00
kmillikin@google.com 0b39927d30 Initial implementation of on-stack replacement (OSR).
Add profiling support to select OSR candidates and launch the compiler
for OSR, followed by entry to the function at the OSR entry point.

Implemented only on IA32 and X64.  The initial implementation can be
improved in various ways --- specifically: tuning of profiling
parameters and incorporation of feedback about the actual values seen
at OSR entry.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//16693006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24024 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:10:55 +00:00
fschneider@google.com 07966b62da Fix two bugs in the Dart VM's super-noSuchMethod invocation.
1. The result value of an expression 
"super.someMissingSetter = val" was incorrect in case of a noSuchMethod call.

To fix this I refactored the BuildStaticNoSuchMethod function. It now no longer
creates AST nodes and visits them, because the last argument may be needed saved
as a result value.

2. The evaluation order of "super[e1] = e2" was wrong in case of a noSuchMethod call.

BUG=dart:8917, dart:10965
TEST=tests/language/super_operator_index7_test.dart, tests/language/super_operator_index8_test.dart
R=srdjan@google.com

Review URL: https://codereview.chromium.org//15979010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23553 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 17:09:09 +00:00
fschneider@google.com 9a6657cd4d Eliminate temporary locals for some expressions
This CL affects a subset of expressions that use temporary locals: constructor
calls, array literals and and instance getter postfix-ops.

For expressions that are de-sugared in the parser I added LetNode.
It creates a scoped temporary local bound to an initializing expression.

For expressions where we need a temporary local at graph-building time,
I added a helper class TempLocalScope to easily create a single temporary
local in the graph builder since this is a frequently recurring pattern.

This simplifies code in the parser and the graph builder and also fixes a
bug with indexed-super invocation and NoSuchMethod.

BUG=dart:8918
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//14942010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23401 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 12:19:21 +00:00
vegorov@google.com b755c8fef7 Basic support for LICM of fully invariant loads.
BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org//14268019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22665 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 10:28:31 +00:00
fschneider@google.com 8ad125f607 Optimize functions containing try-catch.
This is a first step towards fully optimizing try-catch-finally.

At a catch entry, all local variables and parameters are
expected at a fixed stack location. There is a list of
initial definitions at the catch entry block, similar to
the initial definitions at graph entry.

Inside every try-block there is a special prologue code before each
call (instruction that may throw) inside the try-block. This prologue
is similar to a parallel move instruction: It moves all locals+parameters
to the locations expected by the catch-entry block. The stack frame
is extended with the corresponding number of fixed slots right below
the normal spill slots.

Every function containing try-catch has additional compiler-
generated local variables to pass the context, the exception and
the stack trace.

Variable liveness analysis is adapted to treat locals inside try{} blocks
specially: Every call has an implicit LoadLocal of every local variable.
This CL uses a safe approximiation of liveness which can be optimized further.

Current restrictions which are planned for future CLs:
 * No inlining inside try-blocks.
 * No inlining of functions containing try-catch.
 * No try-finally yet.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org//14682020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22615 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-13 10:33:24 +00:00
vegorov@google.com 2565ca222f Implement a variation of scalar replacement for non-escaping allocations.
AllocationSinking pass discovers non-escaping allocations that have no input uses other than uses in the stores into its own fields.

Every environment use of such allocation is replaced by a state snapshot (MaterializeObject instruction) that describes the state of each initialized field in the object. State snapshots are computed through an additional round of load-forwarding.

Once snapshots are computed allocations are removed from the graph.

MaterializeObject instructions are not compiled into native code but produce deoptimization instructions instead that describe how object should be materialized at deoptimization.

Deoptimization instructions now follow the following format:

[mat obj #1]...[mat obj #N][ret addr][... mat arguments ...][... real frames ...]

- the prefix describes each object to materialize on deopt via kMaterializeObject instruction;
- actual values that are needed for materialization are emited as a part of bottom-most stack frame. This is done to simplify implementation: they need to be discoverable by a GC during materialization phase. At the end of deoptimization they will be removed from the stack;
- normal stack slots can refer to materialized objects via kMaterializedObjectRef instruction.

Additionally this change contains fixes in load-forwarding that are needed to guarantee that all artificial LoadField instructions inserted during AllocationSinking are correctly replaced with actual values.

Limitations of the current implementation:

- can't eliminate allocations that flow into phis but otherwise don't actually escape;
- can't sink allocations out of loops;
- allocation with type arguments are not handled.

R=regis@google.com, srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//14935005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22485 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 23:40:42 +00:00
kmillikin@google.com 5868a6bffa Use the constant pool for all constants, not just null.
Remove constants from the instruction stream in optimized code at SSA
construction time.  Modify the range analysis pass to analyze values in the
constant pool.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//14846022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22458 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 12:50:37 +00:00
kmillikin@google.com 7e31a88a0a Initial support for polymorphic inlining.
Consider each polymorphic variant separately for inlining in frequency
order.  Share inlined bodies for shared targets.

Insert an SSA redefinition of the receiver in each inlined variant to
prevent hoisting.  Hoisting code specialized to the receiver (e.g.,
direct access to internal fields of typed data arrays) out of the
inlined body is not safe.

R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//14740005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22434 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 17:22:18 +00:00
vegorov@google.com 34d41f9c80 Track side-effect free paths in the graph to allow CSE and LICM for instructions that depend on some side-effects.
Right now only a single side-effect is important for CSE/LICM purposes: externalization.

But abstractions are in place to introduce others if needed.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//14021016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22180 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 14:25:16 +00:00
kmillikin@google.com 54e54f4194 Refactor the code for making inlining decisions.
Separate the decision to inlin, which produces a graph to inline, from the
act of inlining itself.  For polymorphic inlining we need such a separation.

Change the function that integrates an inlined function graph into a caller
graph so that it operates on a graph entry and set of inlined exits rather
than on an entire flow graph.  Flow graphs represent a whole function so
this change allows us to replace an instruction with an arbitrary subgraph.

Change the name of the InliningContext class to InlineExitCollector to more
accurately reflect what it does.

Review URL: https://codereview.chromium.org//13932005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21539 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 08:40:27 +00:00
vegorov@google.com 81ecaba321 Re-apply r20377.
Compute local variable liveness before translation to SSA.

Use it to remove dead values from deoptimization environments.

R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org//14215006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21439 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 11:53:50 +00:00
kmillikin@google.com 067b9ff8d5 Reapply "Incrementally recompute dominators when inlining."
Including a fix for a silly off-by-one bug.  GrowableArray::TruncateTo takes
the new length, not the new last index.

Review URL: https://codereview.chromium.org//14135006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21353 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:41:10 +00:00
vegorov@google.com 9f3783186f Ensure that all goto instructions have deoptimization target.
R=kmillikin@google.com
BUG=

Review URL: https://codereview.chromium.org//12457034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21351 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:19:34 +00:00
kmillikin@google.com 40002d8663 Revert "Incrementally recompute dominators when inlining."
This reverts svn commit r21268 due to dart2js test failures.

TBR=fschneider@google.com

Review URL: https://codereview.chromium.org//13910003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21270 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:49:07 +00:00
kmillikin@google.com 9cb005c517 Incrementally recompute dominators when inlining.
Before: we marked the entire graph's dominator tree invalid in case there
were multiple exits from an inlined function and recomputed dominators after
inlining.  Now: in case there are multiple exits we collect them in a fresh
join block and compute its immediate dominator as the nearest common
ancestor in the dominator tree over all predecessors.

Review URL: https://codereview.chromium.org//14067002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21268 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 11:44:36 +00:00
srdjan@google.com cbe8bd9a3a Restore r20998 with a bug fix: add field to guarded_fields_ when it contains relevant cid. Was missing most cases and did not check for unique adds.
Review URL: https://codereview.chromium.org//13726023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21008 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 23:26:53 +00:00
srdjan@google.com e7f1ae5383 Revert r20998.
Review URL: https://codereview.chromium.org//13739002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21001 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 21:44:17 +00:00
srdjan@google.com 44938de19c Fix guarded_cid handling: add field to list of guarded_field at LoadField creation time.
Review URL: https://codereview.chromium.org//13529021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20998 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 21:01:30 +00:00
vegorov@google.com 535ed8eb25 Revert "Compute local variable liveness before translation to SSA."
Attaching environments to branches on strict comparisons breaks pattern matching in the optimizer and regresses performance.

This reverts commit r20377.

TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//12827027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20400 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:32:17 +00:00
vegorov@google.com 66ecd504f9 Compute local variable liveness before translation to SSA.
Use it to remove dead values from deoptimization environments.

R=kmillikin@google.com
BUG=

Review URL: https://codereview.chromium.org//12638040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20377 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 12:33:42 +00:00
vegorov@google.com 1c9d22d75c Collect type feedback for fields.
BUG=

Review URL: https://codereview.chromium.org//12529008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20235 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 20:15:10 +00:00
kmillikin@google.com 9ee9cfb78d Remove dead phis as soon as they are discovered.
Previously we removed dead phis late, in the register allocator.  This
change removes them as soon as they are discovered to be dead and packs the
phi array to squeeze out NULLs.  This speeds iteration but doesn't save
space because the phi array is zone-allocated.

The PhiIterator is used everywhere to iterate phis except a few places that
need to know the phi index (e.g., SSA construction, phi elimination).

R=vegorov@google.com

Review URL: https://codereview.chromium.org//12340108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19206 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 08:25:58 +00:00
kmillikin@google.com 45a6441346 Add functions for setting an environment and rebinding a use.
Add functions for setting or clearing an instruction's environment, which
initialize the environment uses.  Add a function for changing a use's
definition.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//12335063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19036 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 11:50:28 +00:00
kmillikin@google.com bfdad288d9 Set instruction/use_index when adding an input to an IL instruction.
When setting an input (including in the constructor) of an IL instruction,
automatically set the input use's instruction and use_index fields.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//12316065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18961 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 11:24:08 +00:00
kmillikin@google.com 87a04450c2 Weaken a bogus assertion in use list verification.
It is allowed for a phi to refer to itself as input without violating
properties of SSA form.

R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org//12317043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18830 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 13:56:40 +00:00
kmillikin@google.com 509261dd45 Reapply "Change the SSA construction pass to also construct def-use chains."
This reapplies svn commit 18813 with a bug fix.  In the case of an
inlined call whose value is not used, the inliner hase inserted a use
of the return value's definition, which must be removed.

R=vegorov@google.com
BUG=

Review URL: https://codereview.chromium.org//12334007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18827 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 12:57:43 +00:00
kmillikin@google.com 733a05c801 Revert "Change the SSA construction pass to also construct def-use chains."
This reverts svn revision 18813 due to dart2js test failures.

TBR=kasperl@google.com
BUG=

Review URL: https://codereview.chromium.org//12313033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18817 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:06:31 +00:00
kmillikin@google.com 85c27b7733 Change the SSA construction pass to also construct def-use chains.
Also modify constant propagation to preserve def-use chains.  Fix a small
bug in the def-use chain for definitions of inlined function return values.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//12326012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18813 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 10:09:10 +00:00
kmillikin@google.com f2053df219 Remove two more places where we computed use lists and add verification.
Remove computation of use lists after type propagation which was
unnecessary, and a call per inlined function after ApplyICData which was
also unnecessary.

Add verification code after all compiler passes.

R=vegorov@google.com
BUG=

Review URL: https://codereview.chromium.org//12317007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18750 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 13:01:25 +00:00
kmillikin@google.com 622efda5fb Convert some compiler passes to preserve valid def-use chains.
Change the ApplyICData, ApplyClassIds, Canonicalize, and
SelectRepresentations passes to preserve valid use lists.

Review URL: https://codereview.chromium.org//12212093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18676 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 12:09:01 +00:00
kmillikin@google.com ab3cbf5796 Change CSE, LICM, and range analysis to preserve use lists.
Change the common subexpression elimination, loop-invariant code
motion, and range analysis passes to maintain use lists.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18209 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 09:42:36 +00:00
kmillikin@google.com 361300cb71 Move recording of definition uses from the value to the definition.
It was weird that this method mutated an object that wasn't even
mentioned in the call.  Also, change Definition::ReplaceUsesWith so that
it appends all at once instead of consing each individual use.

Review URL: https://codereview.chromium.org//12091091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18048 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 14:01:35 +00:00
kmillikin@google.com a2436038da Make use lists into doubly-linked lists.
At the cost of a word per use, we gain constant time removal from use
lists.

BUG=
Review URL: https://codereview.chromium.org//12079096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17924 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 16:10:15 +00:00
kmillikin@google.com 27af144369 Move code around in preparation for better inlining.
To inlining calls in a test context, the code to plug the inlined
function graph into the caller graph should be dispatched on the type
of the inlining context.

This change moves code around without otherwise changing it.

Review URL: https://codereview.chromium.org//11953076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17569 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 14:13:02 +00:00
srdjan@google.com 76dffe600c Removed loop depth info tracking at graph build time.
60% compilation speed improvement on pathological case. Improvements for dart2js

The loop depth signal was made unnecessary by the call frequency signal.
Review URL: https://codereview.chromium.org//11975061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17408 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 16:15:54 +00:00
vegorov@google.com a77fc9701c When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.

BUG=

Review URL: https://codereview.chromium.org//11642003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
kmillikin@google.com 0f65888e88 Change the inlining context from an enum to a class.
To support inlining in test contexts, the inlining context needs to have its
dispatched behavior and state.  This change introduces a context class
representing calls inlined for their value or solely for their effects.  The
intermediate array of exits is moved from the graph to the inlining context.
The implementation behavior is otherwise the same as before.

Review URL: https://codereview.chromium.org//11856010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16965 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 11:43:48 +00:00
zerny@google.com 5aac823c39 Revert "Remove push arguments and replace constants in FlowGraph::InlineCall."
This reverts r14468 due to test failures.

TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//11362060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14471 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 14:02:53 +00:00
zerny@google.com 8522885d32 Remove push arguments and replace constants in FlowGraph::InlineCall.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//11262008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14468 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 13:29:35 +00:00
zerny@google.com 8f5aa24ec9 More inlining flags and tuned heuristics.
The heuristics should be examined further, but these maintain about the same
runtime for the benchmarks while decreasing compile time for dart2js.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org//11269040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14463 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 12:26:07 +00:00