Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields.
Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other
Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//12260008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18456 260f80e4-7a28-3924-810f-c04153c831b5
Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other
Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.
BUG=
Review URL: https://codereview.chromium.org//12221119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18377 260f80e4-7a28-3924-810f-c04153c831b5
This CL provides inline IL code for the getters _getInt8, _getInt16, etc.
to speed up [] and byte array views.
The code uses the existing LoadIndexed instructions by passing a index
scale factor explicitly: For normal arrays loads, the scale factor is equal
to the element size. For byte array access, the scale factor is always 1.
I'm adding inlined setters in a separate CL.
Review URL: https://codereview.chromium.org//12218008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18173 260f80e4-7a28-3924-810f-c04153c831b5
Introduce InvokeMathCFunction that can be used to directly invoke mathematical
function provided by runtime.
Use it to unconditionally inline _Double.pow.
Use it to inline floor, ceil, round, truncate, round when SSE4.1 is not
available.
Perform representation selection phase after constant propagation to minimize
boxing.
Add support for enter instruction in the x64 disassembler.
Add test for optimized pow and fix compilation on windows.
R=fschneider@google.com
BUG=dart:8002
Review URL: https://codereview.chromium.org//12038013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17393 260f80e4-7a28-3924-810f-c04153c831b5
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
Comparisons where the result is only used in a branch on true
can be folded into the branch instruction.
Patterns like this can occur after inlining and constant propagation.
In normal code, we merge branches and comparisons already at graph
building time.
v3 <- (v1 == v2)
Branch if (v3 === true)
is optimized to
Branch if (v1 == v2)
Also: Remove outdated TODOs and rename the canonicalization pass to a
better name.
Review URL: https://codereview.chromium.org//11819031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16919 260f80e4-7a28-3924-810f-c04153c831b5
Implement proposed new identity spec (flag --new_identity_spec). It will be enabled/committed once the new spec been confirmed.
The new spec says that identity of numbers is computed on their values instead of on the object reference. This provides deterministic behavior without having to disable optimizations in the VM. In some cases 'identical' is now slower than 'equality' as more checks need to be done. The VM compiler can optimize 'identical' in the future.
My benchmarks do not show any slow down.
Review URL: https://codereview.chromium.org//11414136
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15332 260f80e4-7a28-3924-810f-c04153c831b5
This optimization does not bring any benefit since all functions
have at least a call in the slow-path of the stack-overflow check.
I'm suggesting to remove support for this optimization since it
does not get triggered currently, therefore is also not tested.
Plus we have inlining now, which already makes calls to (small
enough) leaf functions fast.
Review URL: https://codereview.chromium.org//11086044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13555 260f80e4-7a28-3924-810f-c04153c831b5
In case of a mixed integer/double operation that has a mint
input, the corresponding conversion from unboxed mint to unboxed
double was missing.
This CL converts a unboxed mint to a double by first boxing,
and then unboxing. Currently, we deoptimize in case the result
does not fit into a smi because we can only optimize mixed
smi/double operations and not yet mint/double operations.
BUG=dart:5721
TEST=tests/language/mint_arithmetic.dart
Review URL: https://codereview.chromium.org//11017017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13372 260f80e4-7a28-3924-810f-c04153c831b5
This analysis uses bit vectors to track side effects. Currently, there is
only one type of side effect which affects all mutable load-field instructions.
The elimination pass is a dominator tree preorder traversal like the existing
CSE pass. Instead of a hash-map it keeps an array with the current dominating
occurrence for each load expression.
Review URL: https://codereview.chromium.org//10914314
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12437 260f80e4-7a28-3924-810f-c04153c831b5
This CL adds a new optimization pass that hoist loop invariant
instructions upwards out of loops.
I'm adding a deoptimzation point at every Goto so that we
can move deoptimizing instructions like checks out of loops.
As a result there may be multiple deoptimization descriptors
with the same PC. The corresponding assert are removed.
Review URL: https://chromiumcodereview.appspot.com//10909094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11946 260f80e4-7a28-3924-810f-c04153c831b5
This change works around some difficulties that come from
the distiction between Instruction and Computation in our IL.
We have now two instructions that can wrap a computation and
that makes visiting and replacing in the flow graph optimizer
harder. I added some helpers to work around this for now.
Also fix register constraints for double comparisons: xmm1
is used, but was not reserved as temp.
Review URL: https://chromiumcodereview.appspot.com//10914008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11758 260f80e4-7a28-3924-810f-c04153c831b5
This CL simplifies the code generation for branches: Each BranchInstr
wraps a comparison computation and we can reuse the code between the two
in many cases. Similar to BindInstr, most accessors forward to the wrapped
computation. One exception is the location summary, which is modified for
branches: The result location is removed since branches don't produce a result.
This way, it is easier to replace a comparison branch
with a specialized version and eliminate redundante checks before branches.
Review URL: https://chromiumcodereview.appspot.com//10887009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11500 260f80e4-7a28-3924-810f-c04153c831b5
Original CL: http://codereview.chromium.org/10872035/
It enables elimination of redundant expressions across
basic blocks.
Currently used for smi checks and class checks, but will
be extended to other expressions in a separate CL.
Additionally, this fixes a bug in the register allocator where
a blocked register was illegally assigned to an unallocated live range.
It also fixes a Mac compiler issue with the constructor of
DirectChainedHashMap.
Review URL: https://chromiumcodereview.appspot.com//10871060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11302 260f80e4-7a28-3924-810f-c04153c831b5