Siva Annamalai
2a1d4234ef
Do not allow creation of signature classes in the background compilation path until we have the fix from regis to not use signature classes.
...
R=fschneider@google.com , regis@google.com
Review URL: https://codereview.chromium.org/1579583003 .
2016-01-12 08:53:57 -08:00
Srdjan Mitrovic
6f867815d8
Incremental changes from background compilation work
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1541133003 .
2015-12-22 12:24:01 -08:00
Srdjan Mitrovic
ab7525a820
For background compilation we copy ICData so that it is immutable during comnpilation. However, we must emit the original, shared ICData in the code. Provide a link from cloned ICData object to the original one.
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1544583002 .
2015-12-21 14:49:30 -08:00
Regis Crelier
48bc8bbf33
Remove instantiator argument in generated code for type tests.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1533383003 .
2015-12-21 13:07:32 -08:00
Florian Schneider
4a037f0ccb
VM: Use read-only handle Object::dynamic_type() where possible.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1528873002 .
2015-12-16 11:31:53 +01:00
Srdjan Mitrovic
3a46cc28b7
Polymorphic calls in precompilation invoke megamorphic calls when tests fail (instead of deoptimizing). Move the megamorphic call into a slow path stub. Cleanups.
...
Allow truning off speculative inlining if --max_speculative_inlining_attempts <=0
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1513883002 .
2015-12-15 12:34:55 -08:00
Srdjan Mitrovic
a9ea73b60b
--collect_dynamic_function_names (default false): find unique virtual function names and use them to populate ICData (precompilation only) Measured some performance improvement, some performance loss. Next: tune inlining of getters/setters, check heuristics.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1496713002 .
2015-12-04 13:19:00 -08:00
Florian Schneider
eee0e6d8c3
Fix optimizations on static fields in precompiled code.
...
Don't perform LICM / or load elimination of static fields in precompiled
code since they may not be initialized and we don't record an explicit
dependency between the initialization and the load of a static field.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1497783002 .
2015-12-04 12:42:39 +01:00
Florian Schneider
166b3ddfe3
VM: Fix optimizer bug in smi-op widening.
...
Only consider operations that are used (have an SSA temp) for widening.
Operations without uses will be eliminated as dead code anyway later.
BUG=dartbug.com/24987
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1468433002 .
2015-11-23 09:47:45 +01:00
Srdjan Mitrovic
a9961f8f0a
Various cleanups
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1464593002 .
2015-11-19 13:15:01 -08:00
Srdjan Mitrovic
bad39686a4
Revert "Enable deferred deoptimization always."
...
This reverts commit 94754bee29 .
BUG=
Review URL: https://codereview.chromium.org/1462703002 .
2015-11-18 15:28:34 -08:00
Srdjan Mitrovic
94754bee29
Enable deferred deoptimization always.
...
Deferred deoptimization being moved ahead of entering field dependencies, attempt to use it for non-background-compilation as well. Previous failures not reproducible on Linux ia32 any longer.
BUG=
Review URL: https://codereview.chromium.org/1450973002 .
2015-11-18 14:30:48 -08:00
Florian Schneider
dce89b9b5b
VM: Speculative inlining in precompiled code.
...
Enable inlining of certain smi- and array-operations based on propagated
types and range analysis:
If bounds checks and class checks can not be eliminated, bail out of the
current optimization and retry without speculative inlining using the same
mechanism as we use for far jumps on MIPS.
Allow more speculative inlining attempts with up to n deopt ids black-listed.
For now set n=1 since precompilation time will be proportional to n.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org/1423063005 .
2015-11-18 14:56:06 +01:00
Srdjan Mitrovic
354fcb12cf
Cleanups. More mutator thread asserts.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1448463004 .
2015-11-16 10:29:01 -08:00
Srdjan Mitrovic
baf0ac7e63
Attempt to fix dart2js crashes
...
BUG=
Review URL: https://codereview.chromium.org/1436293002 .
2015-11-12 13:41:35 -08:00
Srdjan Mitrovic
4600d37dc1
Background compilation work:
...
- Defer deoptimization from optimizing compiler to code installation in mutator thread.
- Defer registration of field and leaf class dependency until code is installed in mutator thread.
- Cleanup.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1433243003 .
2015-11-12 11:25:58 -08:00
Lasse R.H. Nielsen
ed0b187d58
Add data-URI support class to dart:core (next to Uri).
...
R=floitsch@google.com , fschneider@google.com
Committed: https://github.com/dart-lang/sdk/commit/bbc66c2c41e61d82d6b85fdd16e2b0f1204c2a33
Review URL: https://codereview.chromium.org/1381033002 .
2015-11-12 13:02:20 +01:00
Florian Schneider
e75056ccb4
VM: Fix bug with CHA-based inlining in --noopt mode.
...
Use propagated cids (not abstract types) only to specialize instance calls.
BUG=dartbug.com/24789
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1419013006 .
2015-11-02 19:48:26 +01:00
Srdjan Mitrovic
772ee329c4
Make ICData changes thread safe (first compute array, then set it). Install code in the main thread instead of in the background compilation thread.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1410363005 .
2015-10-26 15:12:29 -07:00
Florian Schneider
36e63481e0
More general CHA-based inlining and devirtualization for precompiled code.
...
Generalize current approach used for implicit getters/setters to all instance calls.
Additionally use propagated type to resolve targets if no concrete cid
is known:
class A {
void m() { }
void n() => m();
}
class B extends A { }
Even though the receiver type in n() can be A or B (concrete cid unknown), we can still
call m() directly since it is not overridden.
Also, allow inlining of methods that were not compiled yet in precompiled code.
BUG=
R=rmacnak@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org/1410733006 .
2015-10-23 13:34:32 +02:00
Florian Schneider
76e3c5584e
Remove redundant code from flow graph optimizer.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1419743004 .
2015-10-21 18:51:08 +02:00
Srdjan Mitrovic
ecd7457bb3
In precompilation, finalize all classes eagerly. Use the stable class hierarchy for doing CHA based optimizations: inline implicit setters and getters.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1392893003 .
2015-10-14 13:18:10 -07:00
Srdjan Mitrovic
6f53350611
Move deopt_id and related helpers/definitions from Isolate to Thread
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org/1390153004 .
2015-10-13 10:08:14 -07:00
Florian Schneider
8adefa8e79
VM: Support phis with pair representations.
...
This enables unboxed int64 values in phis on 32-bit platforms (ia32, ARM, MIPS).
On ia32 I measured SHA256 +14%, SHA1 +6%, MD5 +2%.
BUG=
R=johnmccutchan@google.com , regis@google.com
Review URL: https://codereview.chromium.org//1377113004 .
2015-10-08 11:43:55 +02:00
Srdjan Mitrovic
193eadbc10
Initial design for background compilation
...
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1386503002 .
2015-10-05 12:29:22 -07:00
Srdjan Mitrovic
d867784de5
Cleanups and preemptively pass Heap::kOld whenever subtype testing in compiler
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1377453005 .
2015-09-29 11:05:54 -07:00
Srdjan Mitrovic
98340f7d9e
Do not eagerly finalize when optimizing. Remove allocation of temporary strings in new space.
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1368173002 .
2015-09-25 14:30:48 -07:00
Daniel Andersson
a1bc527306
Migrate logging infrastructure Isolate->Thread
...
This enables thread-safe logging (e.g., ISL_Print, which will soon be renamed to THR_Print), which is needed for concurrent
marking (DetachCode) and compilation.
Make finalization of GC marking tasks concurrent, now that it's thread-safe.
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1314673008 .
2015-09-09 15:30:38 -07:00
John McCutchan
a9be61a358
Static analysis fixes and debug prints for wedging test
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1302313003 .
2015-08-21 14:31:33 -07:00
Srdjan Mitrovic
ce439a353c
Trace CHA optimizations (where, when, why)
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1289933002 .
2015-08-13 13:47:34 -07:00
Srdjan Mitrovic
8cee9ac89d
Change heuristic to determine which fields contain modifieable double boxes: do it if field was initialized with a double constant. Fix a parser bug
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1278003002 .
2015-08-07 09:16:02 -07:00
Daniel Andersson
c089a152ac
Migrate most uses of Isolate::current_zone to Thread::zone.
...
After https://codereview.chromium.org/1204303003/ is submitted, the last remaining uses can go.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1220193009 .
2015-07-08 09:59:32 -07:00
Srdjan Mitrovic
5711c13f69
Make frequent type checks (instanceof) faster by adding dedicated instanceof methods; improves dart2js startup
...
There is a possibility of adding intrinsics for all new instanceOf methods; my measurements did not show any benefits, therefore they were removed from this CL.
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1222863003 .
2015-07-07 10:20:41 -07:00
Florian Schneider
5daa5646ef
VM: Fix issue with optimizing compiler's range analysis.
...
Narrowing of ranges should only occur if the new range is actually
narrower than the old range. It can happen that a symbolic range
is worse than the already computed one. Ignore the new range in this
case.
BUG=dartbug.com/23693
R=vegorov@google.com
Review URL: https://codereview.chromium.org//1219623004 .
2015-06-29 16:14:06 +02:00
Srdjan Mitrovic
80d98a583b
Carefully restructure TryCreatICData and add guessing for getters and setters; helps --noopt a lot
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1207093002 .
2015-06-24 15:32:33 -07:00
Srdjan Mitrovic
28594e455d
Disable guessing 'other' cid; this prevents an issue in range analysis. It is not clear if guessing the 'other' cid optimization is the right thing to do as it may bring the flow graph in an unexpected state
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1203773002 .
2015-06-23 13:23:02 -07:00
Srdjan Mitrovic
aa8ea6da27
Enable TryCreateICData optimization, disable crashing test in status file
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1198333004 .
2015-06-22 10:58:51 -07:00
Srdjan Mitrovic
b498492194
Fix bingint crash, disable a test
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1194963004 .
2015-06-19 15:18:06 -07:00
Srdjan Mitrovic
2c4605c199
Restore original version of FlowGraphOptimizer::TryCreateICData while investigating dart2js failure
...
BUG=
Review URL: https://codereview.chromium.org//1192873003 .
2015-06-19 13:08:13 -07:00
Srdjan Mitrovic
5ce63657af
Some cleanup and be more conservative when guessing cids: use only current leaf classes; otherwise we may get the cid of e.g., _StringBase, which confuses the VM since an object of that cid is never instantiated.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1186113011 .
2015-06-19 10:16:11 -07:00
Srdjan Mitrovic
2a1f91914e
Disable TryCreateICData until a crash in object.cc has been investigated.
...
BUG=
Review URL: https://codereview.chromium.org//1182323012 .
2015-06-18 15:27:45 -07:00
Srdjan Mitrovic
6ec0903eb1
Fix broken debug build: prevent adding the same cid twice.
...
BUG=
Review URL: https://codereview.chromium.org//1174263005 .
2015-06-18 13:11:45 -07:00
Srdjan Mitrovic
cde9099e31
Noopt work: populate empty ICData of getters and setters with function's own class if that getter/setter exists in the class.
...
Significant performance improvements in DeltaBlue and Richards. No difference in dart2js except the size of Instructions went up by 12%.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1190123002 .
2015-06-18 10:56:23 -07:00
Srdjan Mitrovic
acadc9017c
Inline instanceOf and 'as' operations; fix a bug in code emission
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1175803003 .
2015-06-10 13:17:51 -07:00
Ivan Posva
f5e3f94019
Fix http://dartbug.com/23578 :
...
- Complete revamp of isolate-specific flags.
- Associate flags with the isolate on creation.
- Dart_CreateIsolate and associate callback do take an
extra flags argument.
- Make sure to clear IC data array when clearing code.
BUG=23578
Review URL: https://codereview.chromium.org//1162033005
2015-06-07 17:57:34 +02:00
Srdjan Mitrovic
b611952ead
Prevent excessive deoptimization when optimistically assuming Smi in typed data stores.
...
Moved ICData ahead of class Function, since class Function needs type ICData::DeoptReasonID.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1149403005
2015-06-01 11:42:42 -07:00
Srdjan Mitrovic
d7d0d92ec3
Do not eagerly add guarded leaf classes with CHA; do not add them for private names.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1158673004
2015-05-29 08:57:34 -07:00
Srdjan Mitrovic
ed73a3d151
With --noopt run unoptimized code through optimizer, more optimizations can be done later.
...
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1149713002
2015-05-28 10:05:46 -07:00
Srdjan Mitrovic
91651f8805
Remove value check from ICData checks/house-keeping
...
BUG=
R=johnmccutchan@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//1153963002
2015-05-27 13:17:28 -07:00
srdjan@google.com
3ac643115f
Remove unneeded flag declaratiosn (enable_type_checks, enable_asserts).
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//1133793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45647 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 16:48:43 +00:00