Commit Graph

29 Commits

Author SHA1 Message Date
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 41ff617dbf Don't force range of the RangeBoundary::Shl into the Smi.
This caused overly conservative ranges to be computed for mint-shl expressions.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38402 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 18:17:31 +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
fschneider@google.com fd11452415 Add range analysis for left-shift smi operations.
I factored some operations out into the Range and RangeBoundary class,
so that they can be used from unit tests and added cc tests.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37303 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 07:41:08 +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
srdjan@google.com cf53988cf6 Use range information to omit checks in TRUNCDIV/MOD operations.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30673 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 18:18:24 +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
asiva@google.com 4c069867e4 - Make Boolean 'true' and 'false' singleton VM isolate objects.
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +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
kmillikin@google.com 63fa392807 Reapply "A simpler scheme for garbage collection of ureachable phi inputs."
Fix two issues:

* Unreachable code elimination did not correctly identify all unreachable
  blocks.

* Loop detection in the register allocator relied on the block IDs.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12756 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 07:27:36 +00:00
kmillikin@google.com 52af2225e9 Revert "A simpler scheme for garbage collection of ureachable phi inputs."
This reverts svn revision 12621.  It causes unexpected test timouts.

TBR=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12624 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 09:11:44 +00:00
kmillikin@google.com 13ef2a994e A simpler scheme for garbage collection of ureachable phi inputs.
Simplify the garbage collection of unreachable phi inputs.  Assign immutable
block ids to basic blocks and ensure that both predecessor blocks and phi
inputs are kept sorted by block id.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12621 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 08:47:57 +00:00
kmillikin@google.com 0750c472dc Reapply "Remove classes Computation and BindInstr."
Reapply svn revision 11868 with a bugfix.

Original code review at http://codereview.chromium.org/10908091/

R=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10912094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11890 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 17:04:49 +00:00
kmillikin@google.com 7e36720fa8 Revert "Remove classes Computation and BindInstr."
This reverts svn revision 11868.

TBR=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10917085

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11869 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:20:14 +00:00
kmillikin@google.com bd84c7ee22 Remove classes Computation and BindInstr.
The former Computation classes are folded into the Instruction class
hierarchy.

R=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10908091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11868 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 11:15:34 +00:00
fschneider@google.com 528a73268a Landing: Remove the is_used_ field from BindInstr.
Original CL: https://chromiumcodereview.appspot.com/10916078/
Review URL: https://chromiumcodereview.appspot.com//10908058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11768 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 14:35:02 +00:00
vegorov@google.com a573d2dec8 Unbox phis that were proven to be of type Double.
Eliminate Boxing/Unboxing pairs.

Allow boxing, unboxing and double binary operations to participate in CSE.

Allow double comparisons to operate on unboxed inputs.

Support XMM registers and double spill slots in deoptimization.

Save XMM registers when calling to runtime from WriteBarrier stub.

R=srdjan@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10919008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
kmillikin@google.com ea925449f6 Eliminate class UseVal.
This was the only subclass of Value.  All functionality is moved to the base
class, and all functions are made non-virtual.

R=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10891025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11590 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 09:08:27 +00:00
vegorov@google.com 855629ccae Stop attaching try_index to individual instructions put it at block entry instead.
This simplifies code motion and insertion of instructions that make calls after graph is constructed.

R=srdjan@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10892037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11528 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 16:44:18 +00:00
kmillikin@google.com 58d842d6d7 Make constants computations instead of values.
This change requires a pool of global constants that don't have an easy
place to go in the instruction stream.  Currently, that is only the constant
null used to mark eliminated phis in deoptimization environments.

R=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10894034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11518 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 12:56:57 +00:00
zerny@google.com 50b114c606 Compute the def-use list on-demand by walking the dominator tree.
This replaces the previous implementation that maintained the def-use lists.

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

Review URL: https://chromiumcodereview.appspot.com//10879036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11241 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 16:23:05 +00:00
fschneider@google.com 855e718f5b Make Value not a subclass of Computation.
Instead I introduce one new computation to materialize constants.

sizeof(UseVal) drops from 64 to 32.
sizeof(ConstantVal) drops from 48 to 16.
Review URL: https://chromiumcodereview.appspot.com//10829451

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11041 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:36:36 +00:00
fschneider@google.com 33efb39372 Fix a bug in Equals for UseVal and ConstantVal.
TEST=vm/intermediate_language_test.cc
Review URL: https://chromiumcodereview.appspot.com//10828414

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11037 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:07:40 +00:00
fschneider@google.com 2b3ea645f3 Fix crash bug when replacing a definition with a definition that has no uses.
TEST=vm/intermediate_language_test.cc
Review URL: https://chromiumcodereview.appspot.com//10826299

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10630 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 11:18:48 +00:00
zerny@google.com 24771817a2 Added def-use chain to the intermediate language.
R=fschneider@google.com,kmillikin@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10826230

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10497 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 12:35:59 +00:00
kmillikin@google.com 5f541253ad Eliminate the type distinction between BindInstr and DoInstr.
Represent the distinction between computations whose value is used and
computations whose value is unused with a data member (instead of a
separate type).

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

Review URL: https://chromiumcodereview.appspot.com//10700111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9416 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-05 10:06:28 +00:00
srdjan@google.com eeda4b5810 First step toward an optimizing compiler:
- Fix ic-data instrumentation
- Optimize '+' for Smi-s only, by replacing the instance call with inlined operations.
- Add deoptimization stub
- Add deoptimzation support.
Review URL: https://chromiumcodereview.appspot.com//10431006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7952 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 16:50:57 +00:00
srdjan@google.com e8114222fe New compiler, intermediate language, type testing and casting changes as agreed with Kevin.
Review URL: https://chromiumcodereview.appspot.com//9454022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4554 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 22:51:18 +00:00