Commit Graph

34 Commits

Author SHA1 Message Date
vegorov@google.com 1bd5a9b414 Skeleton of a linear scan register allocator.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9563 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:52:17 +00:00
vegorov@google.com 1ae72fbd8b Change comparison-to-branch fusion to actually remove comparison from the graph.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9556 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 17:41:54 +00:00
kmillikin@google.com ac0025ebd3 Use the instruction iterator rather than an explicit loop in more places.
R=vegorov@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9467 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 12:58:36 +00:00
kmillikin@google.com 6bd463ee85 Rename the successor field of instruction to next.
Renaming only change to use a name parallel to 'previous'.

R=vegorov@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9464 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 11:38:29 +00:00
kmillikin@google.com 0b1f1323cd Remove the instruction pointer from computations.
Remove the back pointers from computations to instructions in favor of
passing the instruction explicitly when needed.

R=fschneider@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9435 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 11:10:53 +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
fschneider@google.com eba7136e7b Make IL instructions a doubly-linked list within basic blocks.
In order to be able to efficiently iterate backwards over instructions
and removing or replacing instructions in the graph we want them to
be a double-linked list inside basic blocks. The list has the following

1. Block entry instructions do not have a previous instruction.
2. The last instruction in a block may or may not have a next instruction:
   - Branches have a NULL-successor.
   - Normal block exits have a block entry instructions as successor.

This CL also makes the accessor for previous and next instruction in this
list non-virtual. This avoidis the current code duplication there.
Review URL: https://chromiumcodereview.appspot.com//10665022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9297 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 16:08:58 +00:00
srdjan@google.com a799978f11 Recognize leaf functions: skip stack check and populating the pc slot, store the pc slot lazily in case of deoptimization.
Review URL: https://chromiumcodereview.appspot.com//10668034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9095 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:50:37 +00:00
srdjan@google.com f7a999dc34 Do not issue Mint/Smi code sequence if we have only Smi/Smi comnbination.
Review URL: https://chromiumcodereview.appspot.com//10642026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9044 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 21:07:03 +00:00
srdjan@google.com 8ee92c41d6 Fixed a typo, one more reason to get rid of StrictCompare vs StrictCompareComp distinction.
Review URL: https://chromiumcodereview.appspot.com//10634032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9039 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 18:28:16 +00:00
regis@google.com df25e13d4c Improve inlining of bit_and operation for Mint and Smi in new compilers.
Review URL: https://chromiumcodereview.appspot.com//10592028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8998 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 19:37:15 +00:00
srdjan@google.com 5f509dc665 Removing more IC calls in optimized code.
Review URL: https://chromiumcodereview.appspot.com//10572050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8950 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 23:19:02 +00:00
srdjan@google.com 3b0fd96a70 Fuse Comparison->BooleanNegate->Branch.
Review URL: https://chromiumcodereview.appspot.com//10559072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8914 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 16:25:11 +00:00
srdjan@google.com 60fa0b27ca More ICData cleanups: try to use ICData instead of converting it to another intermediate representation. This sets the stage for more & simpler optimizations based on collected type feedback.
Review URL: https://chromiumcodereview.appspot.com//10594002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8877 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:49:11 +00:00
srdjan@google.com 7f8cbb12b7 This is https://chromiumcodereview.appspot.com/10581006/ that I forgot to submit, and messed up the original accidentally. Submitting as TBR
Review URL: https://chromiumcodereview.appspot.com//10580024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8871 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:19:00 +00:00
regis@google.com 030a798c9f Inline binary And operation for Mint and Smi in new compilers.
Review URL: https://chromiumcodereview.appspot.com//10553040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8825 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 21:55:52 +00:00
regis@google.com 7527d97cf5 Inline Math.sqrt in new compilers.
Review URL: https://chromiumcodereview.appspot.com//10542167

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8702 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 00:56:25 +00:00
srdjan@google.com f26f243476 Improve equality operation (inline, direct calls).
Review URL: https://chromiumcodereview.appspot.com//10545186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8700 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 00:40:58 +00:00
srdjan@google.com 70bc9aa213 Add token kind into InstanceCallComp so that we do not need to extract it from name (addresses vego…
Review URL: https://chromiumcodereview.appspot.com//10536162

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8675 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 17:41:54 +00:00
srdjan@google.com 3f662c0d5a Restore changes lost in merge for r8626 (equality operation).
Review URL: https://chromiumcodereview.appspot.com//10546154

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8629 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 21:13:09 +00:00
srdjan@google.com 681165b68b Some cleanups, started implementing checked instance calls, better equality operation.
Review URL: https://chromiumcodereview.appspot.com//10541135

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8626 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 18:48:46 +00:00
vegorov@google.com fadac390f3 Fuse comparisons that are used by branches together.
This allows us to eliminate materialization of boolean value.

Fix a bug in ToDoubleComp::LocationSummary on ia32.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8617 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 16:23:14 +00:00
vegorov@google.com d5799bd9c6 Optimize StoreIndexedComp on ia32&x64.
R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8595 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 08:53:54 +00:00
vegorov@google.com bd19464867 Implement kDoubleToDouble and kIntegerToDouble on ia32 and x64.
Fix bug in assembling of cvtsi2sd on x64.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8593 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 08:29:40 +00:00
srdjan@google.com 751e48d363 Fix a typo in the new compiler's optimizer.
Review URL: https://chromiumcodereview.appspot.com//10548009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8572 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 20:18:22 +00:00
srdjan@google.com 0f925121e8 Add code comment to ia32 disassembly as well, bug fix new ia32 compiler, remove use of TMP register outside the assembler. Inlined special methods: ObjectArray, ImmutableArray and GrowableArray and String length getters.
Review URL: https://chromiumcodereview.appspot.com//10536096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8554 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:09:02 +00:00
srdjan@google.com 5ad91ae250 Add stack check in loops so that loops can be stopped. Optimize relational operations.
Use class-ids to describe type of operation. Should we adapt BinaryOp to use class ids as well?
Review URL: https://chromiumcodereview.appspot.com//10536086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8507 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 17:02:39 +00:00
vegorov@google.com 20549ee20d Implement inlined LoadIndexed operation for arrays on x64.
R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8462 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 19:36:26 +00:00
vegorov@google.com 70a81f4264 Implement inlined version of binary arithmetic operations for doubles.
No attempt to reuse temporary boxes or locally propagate types is done.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8433 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 11:27:28 +00:00
srdjan@google.com bd0bda32f0 Inline setters, getters, various cleanups & restructuring.
TODO: cid, token_index and try_index are often passsed around. We should pack them in a data structure.
Review URL: https://chromiumcodereview.appspot.com//10540040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8406 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 19:49:50 +00:00
srdjan@google.com 755790f46f Adding unary op optimizations, missing assembly operations.
Review URL: https://chromiumcodereview.appspot.com//10440099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8174 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 20:38:55 +00:00
srdjan@google.com b4b68ef347 Move ReturnInstr to new scheme (x64 and ia32) and implement more code in new ia32 compiler.
Review URL: https://chromiumcodereview.appspot.com//10458050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8166 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 17:24:23 +00:00
srdjan@google.com 742a716dc7 Fix a bug in ia32 shift left , implemented more inlined binary operations in x64.
Review URL: https://chromiumcodereview.appspot.com//10440082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8119 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:35:20 +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