Commit Graph

45 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
Zachary Anderson aa79ee775e DBC: Fix intrinsics bug
Fall-through when allocation fails.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2429723003 .
2016-10-18 13:07:19 -07:00
Zachary Anderson c8970d0524 DBC: Fix CheckClass bug. Add some intrinsics
Flutter layout benchmark 8.5k us -> 6k us.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418073002 .
2016-10-17 10:20:56 -07:00
Ryan Macnak 74e6376b5c Fix unoptimized code calling a disabled code when --verify-on-transition is enabled.
Unoptimized code has a static call to optimized code.
Optimized code prologue goes to the OptimizeInvokedFunction runtime.
Callee schedule for background compilation and current code set the return entries return value.
Verify-on-transition triggers a safepoint, wherein the background compiler disables the old optimized code.
The OptimizedInvokedFunction stub calls through the disabled code.
FixCallersTarget see an unoptimized caller. BOOM

Similar problem without --verify-on-transition, except the safepoint comes from BackgroundCompiler::CompileOptimized.

Fixes #26927.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418673002 .
2016-10-14 10:01:42 -07:00
Zachary Anderson 08d70cdca5 DBC: Fix CheckCids instruction
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2408423004 .
2016-10-12 12:45:38 -07:00
Zachary Anderson 775fce18d5 DBC: Add Smi fastpath to AssertAssignable
Flutter layout benchmark 14k us -> 10k us. ~30%
improvement in checked mode. There still appear
to be a lot of checks that should be hitting the
cache, so there may be other fast-paths needed
as well.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2404163004 .
2016-10-11 14:25:14 -07:00
Zachary Anderson f713658b71 DBC: Pull BadTypeError out of AssertAssignable
This was allocating a handle which is not allowed in the simulator loop.

Small improvement in Flutter's layout_bench in checked
mode. 15k us -> 14k us. 7% improvement.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2406383002 .
2016-10-11 11:04:17 -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
Ryan Macnak e3420eab29 Revert "Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code object."
This reverts commit 3413e052b3.

Review URL: https://codereview.chromium.org/2374173002 .
2016-09-28 13:00:00 -07:00
Ryan Macnak 3413e052b3 Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code object.
This is prep work for lazy deopt without code patching.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2376843002 .
2016-09-28 10:15:09 -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
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
Ryan Macnak 59c52a5b64 Partially implement DBC profiler.
- Fix setting exit frame info to indicate when we are executing Dart code.
 - Copy local pc to memory on call and return to make it accessible to the profiler. Since the profiler cannot access the local pc, the profiler is not accurate at the instruction level.
 - Teach the profiler's stack walker that the stack grows up for Dart frames on DBC.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2250823002 .
2016-08-19 16:48:34 -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 585c476973 DBC: Add single stepping check to fast Smi ops.
Issue #26405

R=zra@google.com

Review URL: https://codereview.chromium.org/2189253002 .
2016-07-29 10:03:31 -07:00
Ryan Macnak f6a320b973 DBC: Implement coverage by adding missing count increments to unoptimized static and instance calls.
These counts also factor into inlining decisions.

R=zra@google.com

Review URL: https://codereview.chromium.org/2187423002 .
2016-07-28 16:43:47 -07:00
Zachary Anderson 9eca0e5714 DBC: Fix 32-bit build
Review URL: https://codereview.chromium.org/2178413002 .
2016-07-26 07:50: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 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 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
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
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
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
Zachary Anderson de78ddbc55 DBC: Collect type feedback for fastpath smi ops
R=turnidge@google.com, vegorov@google.com

Review URL: https://codereview.chromium.org/2015113002 .
2016-06-03 09:09:13 -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
Zachary Anderson 78de302495 Fix DBC product build
fixes #26415

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1945183006 .
2016-05-05 15:57:16 -07: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
Zachary Anderson 046715867e Fixes assert assignable check for DBC
R=iposva@google.com

Review URL: https://codereview.chromium.org/1926453002 .
2016-04-27 10:05:39 -07:00
Zachary Anderson 3d7202bad3 DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.

This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:

$ ./tools/build.py -m release -a simdbc{64} --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -07:00
Zach Anderson a7295bbb2a Fixes DBC build for Mac
Also, adds an option to the GN build for DBC

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1910453003 .
2016-04-20 14:38:49 -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