Commit Graph

43 Commits

Author SHA1 Message Date
Zachary Anderson 088347fd9d Reland "Add DoubleTestOp instruction"
Fixes DoubteTestOpInstr::AttributesEqual()

Review URL: https://codereview.chromium.org/2433813002 .
2016-10-18 22:46:36 -07:00
Zachary Anderson f6296cc91b Revert "Add DoubleTestOp instruction"
Review URL: https://codereview.chromium.org/2432903002 .
2016-10-18 21:57:05 -07:00
Zachary Anderson fa855cf1c2 Add DoubleTestOp instruction
This gives a ~5% bump to the Flutter layout benchmark
in checked mode.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2423843002 .
2016-10-18 21:24:12 -07:00
Florian Schneider 6d66f3dea8 VM: Make optimized try-catch work in DBC.
The catch entry block has all locals in fixed locations
(Rj) where j = kNumberOfRegisters - i for parameter i.

This means we reserve a range of DBC registers at the top-end of the frame.
Those registers are blocked for general allocation to avoid any overlap
with the rest of the registers that are allocated from the bottom.

Each optimized frame with a try-catch will be kNumberOfRegisters wide.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2388093003 .
2016-10-13 11:36:23 -07:00
Florian Schneider e013aaa511 Fix DBC double comparisons for NaN.
Because NaN is not handled in a separate branch (like on other architetures -
e.g. branch-on-parity-flag on ia32), and every comparison with NaN returns false,
except "!=" we can't flip the branch condition in the same way for double
compares like we do for integer compares.

We could re-order blocks to always make the false-successor the fall-through, but
for now I just disable flipping the branch condition for double compares.

BUG=#27481
R=zra@google.com

Review URL: https://codereview.chromium.org/2400103002 .
2016-10-07 15:30:21 -07:00
Florian Schneider a292de544f DBC: Support large offsets in optimized field access.
Added two new bytecodes: LoadFieldExt, StoreFieldExt that
store the field offset in the following nop-instruction that
is skipped.  This allows offsets up to 16 bit.

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2399333003 .
2016-10-07 14:03:34 -07:00
Zachary Anderson bc1dc06687 DBC: Double converstion instructions
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2341683003 .
2016-09-15 09:18:32 -07:00
Zachary Anderson 360d55b4f6 DBC: Another allocation fast path
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2335363002 .
2016-09-14 10:24:58 -07:00
Zachary Anderson 7d01ca5e0d DBC: A couple allocation fastpaths.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2331033003 .
2016-09-13 10:21:27 -07:00
Florian Schneider 7d6f78b88f VM: More refactoring of recognized methods inlining.
Move inlining OneByteString._setAt, List constructor, Object constructor
and a few math function to the flow-graph inliner.

Enable inlining of trigonometric math functions in AOT that were previously not inlined.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2273943002 .
2016-08-24 10:35:05 -07:00
Zachary Anderson b49de12f6c DBC: Fix more HTTP benchmark bailouts
HttpRequest(IOPerSecond) ~300 -> ~350

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2270483002 .
2016-08-22 15:57:57 -07:00
Zachary Anderson ae3d47fdc4 DBC: Add back special case for float64 load/store
After my last change eliminating the special case, there was a
20% perf drop on FluidMotion.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2268593002 .
2016-08-22 14:39:27 -07:00
Zachary Anderson 08ff3c039e DBC: Fixes typed data bugs. Adds unboxed int32 instructions
Typed data indexing was all wrong. It was also wrong to clobber the index register in LoadIndexed.

RSA benchmark: 88s -> 0.7s

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2258493004 .
2016-08-19 15:23:16 -07:00
Zachary Anderson f7e186eb20 DBC: Instructions for bailouts from http tests.
Load/Store indexed from typed data arrays, etc.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2258613002 .
2016-08-18 09:50:55 -07:00
Zachary Anderson c75200774b DBC: Fleshing out the polymorphic instance call instruction
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2244313002 .
2016-08-16 11:21:25 -07:00
Ryan Macnak 10863a8f0c DBC: Fail cleanly when attempting to create an AOT or JIT app snapshot.
Use the appropriate object pool entry type for native functions (makes a JIT app snapshot fail at snapshot creation time instead of runtime).

R=zra@google.com

Review URL: https://codereview.chromium.org/2196693003 .
2016-07-29 14:11:27 -07:00
Ryan Macnak 634a62c9df DBC: Add missing deopt info after stack overflow checks.
Fixes collecting a debugger stack trace at an interrupt.

Enable most vm-service tests.

R=zra@google.com

Review URL: https://codereview.chromium.org/2183993004 .
2016-07-27 12:25:54 -07:00
Zachary Anderson d279392430 DBC: More Load/Store Indexed variants, A few more math instructions.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2181713002 .
2016-07-25 13:40:37 -07:00
Zachary Anderson 2c6449087d DBC: Misc double instructions
- DoubleToSmi
- MathUnary
- MathMinMax

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2162173002 .
2016-07-20 09:46:32 -07:00
Zachary Anderson 8aed249e88 DBC: A bit of Polymorphic instance call
Only for the case without checks. Still enough for a good bump on
Richards. I've also increased the number of "registers" to 32 to
get rid of the SPILLs on DeltaBlue, but couldn't see a performnace
improvement. Probably better not to bail out, though.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2162953005 .
2016-07-20 08:54:50 -07:00
Zachary Anderson 43e89ccdd3 DBC: Make unoptimized static calls call through ICData
Isolate reloading works by manipulating ICData. Unoptimized
static calls won't go to the new function after a reload unless
the calls go through the ICData.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2149993006 .
2016-07-18 10:39:09 -07:00
Zachary Anderson b43b9bad86 DBC: UnboxedConstantInstr
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2150933008 .
2016-07-15 14:25:40 -07:00
Florian Schneider d3810213b0 VM: Array bounds checks that don't deoptimize for precompiled code.
1. Make CheckArrayBoundInstr also check the index for smi. This allows easy replacement
of the deoptimizing checks with the slow-path checks in the precompiler.

2. Add GenericCheckBoundInstr which has a slow-path attached for
handling check failures.

BUG=
R=rmacnak@google.com, vegorov@google.com

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

Committed: https://github.com/dart-lang/sdk/commit/4a5f651c4b2202013ab7c3db887fd95e2597e173
2016-07-15 10:07:41 -07:00
Zachary Anderson fe2b7b35c4 DBC: Enables unboxed doubles
This CL enables unboxed doubles for simdbc64. Unboxed
doubles are stored in regular dbc registers, which are
really 64-bit stack slots. It also implements binary
and unary double operations and comparisons.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2120703002 .
2016-07-14 16:05:20 -07:00
Ryan Macnak 2a535414bc Revert "VM: Array bounds checks that don't deoptimize for precompiled code."
This reverts commit 4a5f651c4b.

Review URL: https://codereview.chromium.org/2152683003 .
2016-07-14 13:28:23 -07:00
Florian Schneider 4a5f651c4b VM: Array bounds checks that don't deoptimize for precompiled code.
1. Make CheckArrayBoundInstr also check the index for smi. This allows easy replacement
of the deoptimizing checks with the slow-path checks in the precompiler.

2. Add GenericCheckBoundInstr which has a slow-path attached for
handling check failures.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2149023002 .
2016-07-14 10:48:50 -07:00
Zachary Anderson 726fd84ff4 DBC: Various instructions.
- LoadIndexed
- EqualityCompare
- RelationalOp

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2113563002 .
2016-07-11 09:02:18 -07:00
Ryan Macnak 0737ee08bf DBC: Implement TestCids instruction.
Separate out instructions that won't be implemented.

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2122363002 .
2016-07-07 17:57:39 -07:00
Zachary Anderson 1c783dea87 DBC: Remove special case from CheckClassInstr. Cleanup.
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2111803003 .
2016-07-01 10:19:21 -07:00
Ryan Macnak 17e0b56025 DBC: Implement TestSmi instruction.
Somewhat simplify branch generation.

R=zra@google.com

Review URL: https://codereview.chromium.org/2113523002 .
2016-06-29 16:54:20 -07:00
Zachary Anderson db26281172 DBC: CheckClassInstr
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2098573004 .
2016-06-29 15:25:43 -07:00
Ryan Macnak f84facd284 DBC: Implement OneByteStringFromCharCode and StringToCharCode.
R=zra@google.com

Review URL: https://codereview.chromium.org/2104093003 .
2016-06-29 09:44:31 -07:00
Ryan Macnak 5548f4dd67 DBC: Implement InstanceOf.
R=zra@google.com

Review URL: https://codereview.chromium.org/2109743002 .
2016-06-28 15:45:26 -07:00
Zachary Anderson 4fae9d3efa DBC: Adds UnarySmiOp instruction, etc.
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2076773002 .
2016-06-21 13:40:45 -07:00
Vyacheslav Egorov 669edf6375 VM: Fix frame size computation for optimized DBC code
Register allocator was not accounting for fixed register constraints correctly.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2072823002 .
2016-06-16 21:58:55 +02:00
Zachary Anderson b3e5c5eeed DBC: Adds BinarySmiOp instruction
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2053213004 .
2016-06-15 14:48:11 -07:00
Zachary Anderson 6e90ca4e0a DBC: Eager deoptimization and CheckSmi instruction.
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2039913006 .
2016-06-09 09:47:56 -07:00
Ivan Posva 0c38e23e1d - Fix product mode SIMDBC build.
BUG=

Review URL: https://codereview.chromium.org/2011363002 .
2016-05-27 10:56:11 -07:00
Vyacheslav Egorov 655bc90489 Enable optimizer pipeline for DBC.
Most of the infrastructure is fixed to work with DBC stack layout:

- register allocator allocates DBC registers with the limitation that we allocate only 20 registers and bail out if anything needs spilling (there is no use implementing spilling on DBC because registers are memory locations themselves). We should be able to bump number of CPU registers on DBC up to 256 but this requires major surgery in some parts - so I postponed this;
- lazy deoptimization is implemented, eager deoptimization is not - because we don't emit any code that actually requires it. it's a minor change to support it once we have a target;
- stack scanning respects stack maps built by registers allocator;

We bailout from all unsupported instructions.

R=zra@google.com

Review URL: https://codereview.chromium.org/1992963002 .
2016-05-24 14:35:50 +02:00
Florian Schneider d7c9421e32 Fix DBC build after my last change.
Forgot to rename StringFromCharCode.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1973493002 .
2016-05-11 14:58:59 +02:00
Zachary Anderson 5d7ecb8500 Adds LoadClassIdInstr to DBC
R=iposva@google.com, vegorov@google.com

Review URL: https://codereview.chromium.org/1922173003 .
2016-05-02 09:02:22 -07:00
Ryan Macnak 05d8185470 Never include_isolate or allow_embedded_addresses.
Makes the JIT PIC on non-IA32 like precompilation, a prerequisite for caching code across processes.

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

Review URL: https://codereview.chromium.org/1911253002 .
2016-04-22 20:47:23 -07:00
Vyacheslav Egorov ee0f608ce4 Dart Byte Code interpreter.
This version is Clang/GCC only and does not support Windows because it uses computed goto's.

Only unoptimized mode is supported.

Architecture is described in constants_dbc.h and stack_frame_dbc.h.

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

Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00