Commit Graph

213 Commits

Author SHA1 Message Date
johnmccutchan@google.com 635ba4bbd9 Port flow_graph*, disassembler to ISL_Print
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43609 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 20:49:32 +00:00
vegorov@google.com e5f3e69eeb Add --print-flow-graph-filter to allow filtering debugging output.
Extend filtering pattern with % symbol: xyz% matches names that end at "...xyz".

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43598 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 16:26:46 +00:00
srdjan@google.com f116c94dfc Cleanup access to Instruction's fields (especially deopt_id_).
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42405 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 18:27:24 +00:00
vegorov@google.com aa48bd4759 Range feedback for arithmetic operations.
In addition to tracking input and output ranges in the IC-stubs with a Smi fastpath (SmiAdd and SmiSub, currently) this CL also introduces two IC stubs that have no fast-path by still track ranges and update the range feedback.

We are able to distinguish between the following ranges (encoding of the lattice is shown in the parens):

- u-smi  (0000)
- smi    (0001)
- uint31 (0010)
- int32  (0011)
- uint32 (0100)
- int64  (1xxx) and (x1x1)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42370 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 18:48:15 +00:00
zerny@google.com 8e807c8550 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

Committed: https://code.google.com/p/dart/source/detail?r=41949

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41983 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:32:43 +00:00
zerny@google.com 84a4135901 Revert "Integrate the Irregexp Regular Expression Engine."
This reverts commit https://code.google.com/p/dart/source/detail?r=41949

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41950 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:36:40 +00:00
zerny@google.com 43ac0c6f33 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41949 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:10:21 +00:00
fschneider@google.com b26ff22adf Allocation sinking for contexts.
Improved aliasing computation in presence of Redefinition and AssertAssignable.

Added possibility for inlining annotations via --enable-inlining-annotations flag.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41713 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:53:58 +00:00
vegorov@google.com e6847ac17c IR refactoring: consolidate all boxing and unboxing instructions.
BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41437 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 12:17:12 +00:00
fschneider@google.com 876193b31a Make CTX allocatable by the register allocator.
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.

This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 15:42:38 +00:00
vegorov@google.com fb915fe887 IR cleanup: pass deopt id as constructor argument instead of doing deopt_id_ assignment.
This also kills a list of Instruction friends that was growing without bounds.

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41278 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 11:27:17 +00:00
vegorov@google.com 73f4cc059d Fix ConstantPropagator::VisitBinaryDoubleOp to work with all integer types.
R=fschneider@google.com
BUG=http://dartbug.com/20984

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40433 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 12:47:20 +00:00
vegorov@google.com d61a330d7c Initial steps towards cleaning up integer arithmetic IR.
Introduce base classes for binary and unary integer operations and move all shared logic (e.g. canonicalization) into these classes.

Start removing special cases dispatch from instructions patterns - it goes into Canonicalization pass.

Start removing duplication between instruction patterns where meaningful and possible.

Cleanup the notion of truncation in the operations: is_truncating implies !can_overflow, not the other way around.

BUG=
R=johnmccutchan@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40375 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 13:31:13 +00:00
vegorov@google.com 3151f48f54 Cleanup printing of propagated types to make it easier to read.
BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40148 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 13:36:58 +00:00
vegorov@google.com 183abe7207 Fix StoreIndexedInstr input representation requirements for Int32/Uint32 arrays.
Previous implementation changed input representation depending on the propagated type of the value which violated assumptions made by SelectRepresentations phase.

Instead of using tagged/mint input require unboxed Int32/Uint32 input and insert explicit truncating unboxing when building StoreIndexed operation in the optimizer. This also leads to strictly better code and opens possibilities for further optimizations.

Implement Int32/Uint32 representation support on all platforms. This includes boxing, unboxing and unboxed converter operations.

Merge BoxInt32/BoxUint32 and UnboxInt32/UnboxUint32 instruction sequences to minimize duplication.

Improve instruction sequences by utilizing CARRY flag set by smi untagging where possible (ARM, ia32, x86).

Enable all tests that were disabled by r40078, r40079.

BUG=http://dartbug.com/20875
R=fschneider@google.com, johnmccutchan@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40143 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 12:32:54 +00:00
vegorov@google.com 9f9e250e92 Support Int32 representation for selected binary operations.
BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39595 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 14:49:19 +00:00
fschneider@google.com cdd87138d4 Small improvements in array code.
Avoid emitting x - 0 in byte array view code.

Always inline Lists.copy since it is freqently polymorphic.

Fix printing of CreateArrayInstr.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39522 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 15:45:07 +00:00
srdjan@google.com 85af0719ef Faster IC stubs by specializing them for two-argument Smi operations (implemented only a few for now)
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39471 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:08:40 +00:00
johnmccutchan@google.com 342e5c8e35 Inline Int32x4 constructor
(avoids a runtime call for every websocket message in dart:io)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39255 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 17:27:49 +00:00
fschneider@google.com 36c848d1d7 VM: Optimized context allocation on all platforms.
This change generate inline code for context allocation and makes
the stores to initialize the parent pointer and the context variables
explicit in the optimized flow graph. This allows dead store elimination
to eliminate those stores.

Before, we only had inlined context allocation for ia32.

Furthermore:
* Added an assertion that the exit label of slow-path code
is bound when emitting deferred code. This used to cause random crashes
if forgotten.

* Fixed a bug in allocation stats on ARM.

BUG=dartbug.com/17238
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39202 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 15:49:01 +00:00
vegorov@google.com 1acb21443f Consolidate all range analysis related code in a separate file.
This makes working with it easier, similar to how we have all type propagation code in flow_graph_type_propagator.{cc,h}

BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38928 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 12:43:49 +00:00
vegorov@google.com 77c26187f2 Support allocation sinking for compound objects.
- Improve escape/alias analysis:
-- Storing an object into a field of another object does not mean that this object escapes (or has aliases) as long as that object does not have any loads from the same place;
-- Places like X.f and Y.f don't alias if X and Y are two different allocation instructions even if X and Y themselves potentially have aliases;
-- Improve precision of alias analysis for indexed properties;

- Support dematerialization and rematerialization of objects that are referenced by other dematerialized objects.
-- Use fix-point algorithm to collect candidates for allocation sinking;
-- Support aborting unsuccessful allocation sinking.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38404 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 18:35:08 +00:00
johnmccutchan@google.com 2ebd74a740 Add Uint32 representation.
- Add new representation: kUnboxedUint32.
- Add BinaryUint32Op, UnaryUint32Op, ShiftUint32Op instructions.
- Add new optimization pass which replaces Mint instructions with Uint32 instructions when possible.
- IA32 completed.
- ARM completed.

R=fschneider@google.com, vegorov@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38198 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 17:01:02 +00:00
fschneider@google.com b1dfcdde00 Compute ranges for >> smi shifts and eliminate overflow check for smi << operations.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37541 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 12:06:48 +00:00
johnmccutchan@google.com 3eb3bc3fa9 Extend Range analysis to 64-bit range and mint operations
- Convert many private static functions into public static methods on Range or RangeBoundary classes.
- Simplify ConstraintInstr::InferRange to just use RangeBoundary::Min and RangeBoundary::Max calls.
- Extend RangeBoundary to 64-bits.
- Include mints in RangeAnalysis.
- Introduce generic Range::BinaryOp.
- Require ranges passed to Range::BinaryOp are finite.
- Clamp ranges attached to BinarySmiOpInstr and BinaryMintOpInstr.
- InferRange for BinaryMintOp and UnboxInteger instructions.
- Correctly set mint constant ranges.
- Add many tests.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37521 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-19 21:13:26 +00:00
johnmccutchan@google.com e2635e5d1a - Refactor RangeBoundary +/- infinity to be distinct RangeBoundary kinds.
- Add tests for RangeBoundary infinities.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37124 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-09 17:58:31 +00:00
vegorov@google.com 4e286b316f Split GuardField into GuardFieldType and GuardFieldLength instructions.
Record expected length offset that matches guarded_cid.

This greatly simplifies code generation and control flow inside these guards.

Fixes the bug that was causing unoptimized code to call into runtime even when guard did not fail.

Add --trace-field-guards flags to trace updates to the state of guarded fields' properties.

BUG=http://dartbug.com/19003
R=fschneider@google.com, johnmccutchan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36872 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 13:53:53 +00:00
fschneider@google.com c71d29f6b6 VM: Remove unnecessary field use_kind from IL instructions.
We already store a SSA- or temp-index that indicates if a definition
is used or not. There is no need to have a separate field to store
this information.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36432 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 14:26:09 +00:00
srdjan@google.com 1cfd7fa9e3 Convert BinadryDoubleOp to MathUnaryInstr double-square if both inputs are the same. Uses less registers.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35714 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 22:38:18 +00:00
srdjan@google.com 4029485de0 Fix TryICData to create ICData with a valid arguments decriptor.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35601 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 22:05:37 +00:00
fschneider@google.com 1933c126c8 VM: Explicitly load function and context before calling a closure.
Before these were implicitly loaded as part of the closure calling code sequence.

This CL makes those loads canditates for load elimination. The context is also
explictly stored before the call.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35595 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 20:14:02 +00:00
srdjan@google.com 0c2b0af123 Copy of Issue 231383002 after hard disk crash: First step in improving instance of test for a fixed set of value cids returning different results.
Review URL: https://codereview.chromium.org//258563004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35455 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:21:12 +00:00
turnidge@google.com 18a8d7fe4c Fixes bug where we would occasionally materialize a corrupted object.
On the slow path for a stack overflow check we manually spill the live
registers before our call to the runtime function.  We were updating
all uses of these spilled registers in the Environment object but this
was not enough - we also need to update any uses of these spilled
registers in MaterializeObjectInstrs which are hanging off of the
Environment.

This would fail when a deoptimization was triggered during a stack
overflow check and a materialized object happened to refer to
registers.

I've been chasing this for a while and I was able to get it to
reliably reproduce by using the --stacktrace_every=N and the
--stacktrace_filter flags, which were added for this purpose.

ALSO:

Set the top context to null on exceptions/errors.  This is needed for
the --verify-incoming-context flag.

Minor printing improvements.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35443 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 20:24:27 +00:00
johnmccutchan@google.com 3834c9a869 Support for multiple register values
- Adds a PairLocation type (Location is still a single word but now has two tags one for constants and one for pairs).
- New representations: kPairOfTagged & kPairOfUnboxedDouble.
- Register allocator uses second SSA index for Definitions that use two registers.
- Fix LiveRange shape for kWritableRegister inputs.
- Updated MergedMathInstr that returns a kPairOfTagged or kPairOfUnboxedDouble (depending on the merged math kind).
- A new instruction (ExtractNthOutput) for extracting a single register from an instruction that has a output register pair.

Open issues that need to be addressed in a follow up CL:

- Adjust PhiInstr and handling of PhiInstr in the register allocator to work with output pairs (once unboxed mints are in GPRs).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34833 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 16:13:43 +00:00
srdjan@google.com ec6a6d8837 Incremental tuning/cleanup of inlining: --print-inline-tree changed to --print-inlining-tree; print also methods that were not inlined.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34451 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 21:24:35 +00:00
fschneider@google.com 9780267a08 Generate smaller unoptimized code for certain expressions.
Code for compound assignments, pre- and post-fix ++, --, cascades in
effect contexts is now smaller by 1 push/pop instructions.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33641 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 09:07:40 +00:00
johnmccutchan@google.com 08b77f2a1f Inline Float64x2 methods that take 1 argument
BUG=
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33506 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 22:34:56 +00:00
johnmccutchan@google.com 29a0556de7 Inline Float64x2 methods with zero arguments
BUG=
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33504 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 20:58:04 +00:00
fschneider@google.com b5b1be80fa Add alias disambiguation for VM fields.
This is needed for generalizing allocation sinking to
work with instance fields and plain field offsets.

MaterializeObject now works with  a set of Field/Smi objects
Right now this should be performance-neutral, but it already
simplifies the code be removing the fake fields previously used
for type arguments, closure function/context.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33478 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-10 09:59:49 +00:00
johnmccutchan@google.com 115cad1945 Inline of Float64x2 operations round 1
BUG=
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33459 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 21:43:49 +00:00
regis@google.com 8d5dae7798 Allocate instance closures similarly to regular closures, i.e. without a
specific stub and runtime call.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33074 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 18:38:47 +00:00
fschneider@google.com 53abcebbf9 VM: Replace StoreVMField with StoreInstanceField.
This simplifies a lot of code in the optimizer and avoids the confusion
and errors due to mismatch input operands when using StoreVMField.

I added a separate constructor for LoadFieldInstr to avoid having
to explicily set the associated field there.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33059 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 12:12:40 +00:00
fschneider@google.com 13f2d115ef Simplify generated code for object allocation with type arguments.
The motivation for the change is to make allocation sinking more
general when type arguments are in play. As a result I cleaned up the code
dealing with constructor type arguments as follows:

* Remove ExtractConstructorTypeArguments and ExtractConstructorInstantiator
from the intermediate language.

* The allocation stub takes now 1 argument (instead of 2) for parameterized
classes.

* The allocation stub always get an instantiated type arguments object
as input. It does not need to do a lookup in the instantiations array anymore.

* The code for looking up cached instantiated type arguments is moved
to the InstantiateTypeArguments instruction. This instruction is now also
used for object allocation. I'm not sure how relevant the cache lookup is
performance-wise. dart2js compilation did not show any regression without it.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32697 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 13:03:35 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
fschneider@google.com 6abd6e326e Add mutable double boxes for fields.
This allows the optimizing compiler to generate unboxed loads/stores
to fields containing double values. The double value is stored
in a reusable double object.

Unboxed loads/stores are generated for optimized code. Unoptimized code
allocates a new double on loads. To avoid performance regressions
for fields that are only written few times (e.g. only in the constructor)
I put a heuristic in place that
compares the usage count of setters and getters. Unboxed operations
are only generated if the setter is invoked a significant amount of
times (threshold is 10% of getter invocations).

The CL is so big because it changes the way LocationSummmary
is allocated: We now have a bit to generate different summaries
for optimized and unoptimized code.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31164 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 15:11:31 +00:00
fschneider@google.com 8b0b3fde4d Generalize if-conversion to arbitrary smi comparisons.
Until now only == and != comparisons were supported.

Further changes are:
 Remove flag FLAG_new_identity_spec: It is not needed anymore.
 Invoke Canonicalize another time before branch optimizations.
 Fixes support for TestSmiInstr with the branch-simplifier pass.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30622 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 12:57:21 +00:00
srdjan@google.com 3165e204e3 Merge TRUNCDIV and MOD into one instruction. Icorporated feedback from CL https://codereview.chromium.org/68663003
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30536 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 17:56:54 +00:00
srdjan@google.com f981bda8bd Better printing of MathUnaryInstr.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30430 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 23:43:40 +00:00
johnmccutchan@google.com 29c01044bc This is the final breaking change in dart:typed_data needed for Dart 1.0. We need this change because the ECMAScript SIMD specification only includes Int32x4 and Int32x4List and our types must match.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29849 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 21:56:59 +00:00
fschneider@google.com 9031c80c88 Change == into an instance call to allow polymorphic inlining of ==.
In unoptimized code equality is now just another instance call.

The optimizer replaces it with a specialized implementation based on static
 type information and type feedback.

Many of the manual optimizations of == in the optimizer are now just handled
 by the generic inliner, plus polymorphic inlining of == calls is now possible.
This also eliminates the need for a lot of duplicated code in the backend.

I adapted the inlining heuristics to compensate for the slightly larger
inital flow graph size.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29800 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 11:32:52 +00:00