vegorov@google.com
7a6cdd92c7
Remove support for non-ssa optimizing code generation.
...
This kills FrameRegisterAllocator and related code.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10832411
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11045 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:58:57 +00:00
srdjan@google.com
2c6d0181e1
Fix performance regression introduced by new equality semantic: we do not collect ICData when comparing with NULL. For now recognize left/right inputs as being null constant and convert the equality tests to strict-equality. There is still a problem if one of the equality arguments is always null but not a constant.
...
Review URL: https://chromiumcodereview.appspot.com//10861017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11001 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 21:14:37 +00:00
fschneider@google.com
253c3f8499
Implement class id checks as a separate instruction and add a local CSE optimization pass.
...
This CL contains:
A new CheckClassComp instruction. Currently it is used only for instance loads:
(LoadInstanceFieldComp)
A pass LocalCSE that performs block-local common subexpression elimination. To identify
redundant expressions I use a hash map per basic block. Computations that do not have
side effects can participate in CSE. For now, I only enabled it for CheckClass.
Any computation that participates in CSE must implement the AttributesEqual function.
Other smaller fixes:
Places where we can pass the correct initial size for GrowableArrays
that have a known size. We should consider having a FixedLengthArray for this purpose.
Made the accessors ic_data() and set_ic_data() use a const ICData*.
Review URL: https://chromiumcodereview.appspot.com//10824349
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10948 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:40:14 +00:00
srdjan@google.com
564e747c2b
Propagate class ids using existing type propagation framework.
...
Review URL: https://chromiumcodereview.appspot.com//10830339
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10849 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 17:39:37 +00:00
zerny@google.com
5cc78d2a33
Refactored FlowGraphBuilder into a separate FlowGraph representation.
...
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10857016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10807 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:06:17 +00:00
regis@google.com
4bc16ae3f7
Cleanup handling of NullType in type propagation.
...
Remove AssertAssignable type checks from graph (when possible), rather than just
marking them as eliminated.
Review URL: https://chromiumcodereview.appspot.com//10828319
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10782 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:49:12 +00:00
fschneider@google.com
df23e58a2f
Change indexed load and store IL instructions to fit with SSA backend.
...
Generic indexed operations are implemented as normal instance calls. Specialized
operations are inserted by the flow-graph optimizer. This also avoid a lot of duplicated code
in the code generator.
Review URL: https://chromiumcodereview.appspot.com//10836239
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10727 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 13:54:38 +00:00
regis@google.com
4000bbad60
Eliminate condition type check when possible.
...
Review URL: https://chromiumcodereview.appspot.com//10832277
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10610 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 22:31:07 +00:00
fschneider@google.com
94fa6055ab
Optimize expressions of the form (expr === true) when expr has boolean type.
...
This allows us to generate better code for many short-circuit
expressions like a || b, a && b if we can statically determine the type
of the subexpressions.
Also: Avoid disassembling optimized functions twice with --disassemble --disassemble-optimized.
Review URL: https://chromiumcodereview.appspot.com//10830275
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10568 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:10:00 +00:00
regis@google.com
f1bdaf504a
Retrying r10475 (now with null check):
...
Continue work on type propagation in optimizing compiler (still WIP).
Propagated types are cached in ssa definition nodes.
Type propagation iterates until fix point is reached.
Type checks are marked as eliminated when possible.
Review URL: https://chromiumcodereview.appspot.com//10854084
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10478 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 01:26:13 +00:00
regis@google.com
7e27be6b90
Revert r10475.
...
Review URL: https://chromiumcodereview.appspot.com//10831252
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10476 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 00:39:42 +00:00
regis@google.com
28bd435419
Continue work on type propagation in optimizing compiler (still WIP).
...
Propagated types are cached in ssa definition nodes.
Type propagation iterates until fix point is reached.
Type checks are marked as eliminated when possible.
Review URL: https://chromiumcodereview.appspot.com//10829270
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10475 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 00:07:21 +00:00
fschneider@google.com
442b981575
Replace InstanceSetterComp instruction with a plain instance call.
...
After my last change to InstanceSetterComp we do not need a separate
IL instruction for it anymore.
Review URL: https://chromiumcodereview.appspot.com//10829164
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10278 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 08:55:13 +00:00
regis@google.com
ba83d02f9e
Add type propagation phase in optimizing compiler (work in progress).
...
Remove unused cid field from Instruction node and add it to nodes subclassing
Instruction that need it: BranchInstr, ReturnInstr, ThrowInstr, ReThrowInstr.
Remove unused icdata field from Instruction node and add it to BranchInstr.
Review URL: https://chromiumcodereview.appspot.com//10830109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10125 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 17:15:55 +00:00
srdjan@google.com
2016081f87
Fuse compare with branch at graph building time.
...
Review URL: https://chromiumcodereview.appspot.com//10802025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9762 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 15:52:44 +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
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
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
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
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
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
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
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