titzer
6e82fbfbaf
[turbofan] Reland: Optimize loads from the global object in JSTypeFeedbackSpecializer.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1110503002
Cr-Commit-Position: refs/heads/master@{#28073}
2015-04-27 12:15:06 +00:00
machenbach
fbf300802f
Revert of [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer. (patchset #10 id:180001 of https://codereview.chromium.org/1063513003/ )
...
Reason for revert:
[sheriff] Breaks nosnap debug:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug%20-%201/builds/156
Original issue's description:
> [turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
>
> Uses lazy deoptimization and code dependencies to introduce loads
> from property cells and also to promote globals to constants.
>
> R=mstarzinger@chromium.org
> BUG=
>
> Committed: https://crrev.com/aae4a62d07e839455b1d0ad4fa512cc5d48a1a68
> Cr-Commit-Position: refs/heads/master@{#28057}
TBR=mstarzinger@chromium.org ,titzer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/1084533003
Cr-Commit-Position: refs/heads/master@{#28063}
2015-04-27 10:07:08 +00:00
titzer
aae4a62d07
[turbofan] Optimize loads from the global object in JSTypeFeedbackSpecializer.
...
Uses lazy deoptimization and code dependencies to introduce loads
from property cells and also to promote globals to constants.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1063513003
Cr-Commit-Position: refs/heads/master@{#28057}
2015-04-27 09:06:41 +00:00
jarin
ae0bc41635
Fix stack layout of full code arm64 for object literal.
...
BUG=
Review URL: https://codereview.chromium.org/1095203005
Cr-Commit-Position: refs/heads/master@{#28055}
2015-04-27 08:31:33 +00:00
titzer
5b6111edff
Add test for deoptimization bug.
...
R=jarin@chromium.org ,mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1100113002
Cr-Commit-Position: refs/heads/master@{#28013}
2015-04-22 14:32:49 +00:00
titzer
1850803d56
[turbofan] Fix reduction of LoadProperty/StoreProperty to LoadNamed/StoreNamed.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1095313002
Cr-Commit-Position: refs/heads/master@{#27972}
2015-04-21 15:12:58 +00:00
jkummerow
3eb277f270
%GetOptimizationStatus(): Unconditionally return a sentinel when --always-opt is present
...
Review URL: https://codereview.chromium.org/1086923002
Cr-Commit-Position: refs/heads/master@{#27822}
2015-04-14 14:57:48 +00:00
vegorov
021f738127
Treat HArgumentsObject as a safe use during Uint32 analysis phase.
...
Deoptimization infrastructure already handles it correctly.
This change fixes repetitive deoptimizations in the code like this:
var u32 = new Uint32Array(1);
u32[0] = -1;
function tr(x) { return x|0; }
function ld() { return tr(u32[0]); }
while (true) ld();
Currently inlined tr will contain HArgumentsObject that is considered uint32-unsafe use and prevents u32[0] from becoming uint32 load - instead a speculative int32 load is generated which just deopts.
BUG=
Review URL: https://codereview.chromium.org/1077113002
Cr-Commit-Position: refs/heads/master@{#27781}
2015-04-13 10:47:15 +00:00
titzer
a511c78999
Fix maybe_string_add for adds that have no type feedback where --always-opt is on.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1071473003
Cr-Commit-Position: refs/heads/master@{#27667}
2015-04-08 13:14:30 +00:00
titzer
ebc5167476
[turbofan] Fix loading of JSFunction from activation in case of adapter frame.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1026023004
Cr-Commit-Position: refs/heads/master@{#27454}
2015-03-25 17:46:16 +00:00
bmeurer
ff89876bb9
[turbofan] Fix lowering of Math.max for integral inputs.
...
R=jarin@chromium.org
BUG=chromium:468162
LOG=y
Review URL: https://codereview.chromium.org/1027753002
Cr-Commit-Position: refs/heads/master@{#27341}
2015-03-20 12:05:19 +00:00
bmeurer
d5893cad6b
[turbofan] Work-around untagged result of CompareIC in pointer maps.
...
BUG=chromium:469089
LOG=n
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/1026683002
Cr-Commit-Position: refs/heads/master@{#27333}
2015-03-20 09:45:12 +00:00
jarin
b7dc9c580a
[turbofan] Remember types for deoptimization during simplified lowering.
...
With this change, we remember the types of frame state inputs (in a new
operator, called TypedStateValues). Instead of inferring the value types
when building translations, we used the recorded types.
The original approach was not reliable because the passes after
simplified lowering can change node types, and this in turn confuses
the translation builder.
BUG=chromium:468727
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/1015423002
Cr-Commit-Position: refs/heads/master@{#27310}
2015-03-19 14:00:33 +00:00
jarin
0cde253c9e
[turbofan] Support lazy deopt for truncating store to a typed array.
...
The change introduces a second frame state (for the state before
the operation) for the StoreProperty nodes. If the store writes
into a typed array, the frame state is used for lazy deopt from
the to-number conversion that is performed by the store.
BUG=v8:3963
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/997983004
Cr-Commit-Position: refs/heads/master@{#27285}
2015-03-19 05:46:30 +00:00
titzer
434d1ad014
[turbofan] Fix bug in OSR deconstruction.
...
In constructing the transfer between loop copies, we need to merge the backedges from all the previous copies of the given loop. The control reduction will work out which ones are really reachable.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1004993004
Cr-Commit-Position: refs/heads/master@{#27246}
2015-03-17 17:55:29 +00:00
titzer
0b3f4af12c
[turbofan] Fix --turbo-osr for OSRing into inner loop inside for-in.
...
R=mstarzinger@chromium.org
BUG=chromium:462775
LOG=Y
Review URL: https://codereview.chromium.org/988423003
Cr-Commit-Position: refs/heads/master@{#27088}
2015-03-10 09:27:40 +00:00
jarin
6f559b7ec3
[turbofan] Fix lazy deopt for JSToNumber conversions in binary operations.
...
This slightly hacky change provides lazy deopt points for to-number conversions in binops: When we deopt from a to-number conversion, we create a frame state with the already-converted value(s) so that we do not repeat the side effect of the conversion.
Embenchen numbers are below. It is not quite clear what happened to fasta - the hot code looks nearly identical.
Current: EmbenchenBox2d(RunTime): 12746 ms.
d8-master: EmbenchenBox2d(RunTime): 13861 ms.
----------- bullet.js
Current: EmbenchenBullet(RunTime): 17680 ms.
d8-master: EmbenchenBullet(RunTime): 19170 ms.
----------- copy.js
Current: EmbenchenCopy(RunTime): 4939 ms.
d8-master: EmbenchenCopy(RunTime): 4943 ms.
----------- corrections.js
Current: EmbenchenCorrections(RunTime): 6639 ms.
d8-master: EmbenchenCorrections(RunTime): 6728 ms.
----------- fannkuch.js
Current: EmbenchenFannkuch(RunTime): 4630 ms.
d8-master: EmbenchenFannkuch(RunTime): 4872 ms.
----------- fasta.js
Current: EmbenchenFasta(RunTime): 10209 ms.
d8-master: EmbenchenFasta(RunTime): 9673 ms.
----------- lua_binarytrees.js
Current: EmbenchenLuaBinaryTrees(RunTime): 12936 ms.
d8-master: EmbenchenLuaBinaryTrees(RunTime): 15529 ms.
----------- memops.js
Current: EmbenchenMemOps(RunTime): 7357 ms.
d8-master: EmbenchenMemOps(RunTime): 7340 ms.
----------- primes.js
Current: EmbenchenPrimes(RunTime): 7530 ms.
d8-master: EmbenchenPrimes(RunTime): 7457 ms.
----------- skinning.js
Current: EmbenchenSkinning(RunTime): 15832 ms.
d8-master: EmbenchenSkinning(RunTime): 15630 ms.
----------- zlib.js
Current: EmbenchenZLib(RunTime): 11176 ms.
d8-master: EmbenchenZLib(RunTime): 11324 ms.
BUG=
Review URL: https://codereview.chromium.org/985713003
Cr-Commit-Position: refs/heads/master@{#27071}
2015-03-09 13:24:42 +00:00
mstarzinger
dcb502a4ee
[turbofan] Only reduce inline %DeoptimizeNow.
...
This makes sure only the %_DeoptimizeNow intrinsic is inlined, and
not the %DeoptimizeNow one. It hence re-establishes the invariant
that JSIntrinsicLowering only deals with inline intrinsics.
R=jarin@chromium.org
TEST=mjsunit/compiler/eager-deopt-simple
Review URL: https://codereview.chromium.org/988333003
Cr-Commit-Position: refs/heads/master@{#27070}
2015-03-09 13:20:26 +00:00
jarin
8d2e45669f
[turbofan] First shot at eager deoptimization in Turbofan.
...
BUG=
Review URL: https://codereview.chromium.org/961973002
Cr-Commit-Position: refs/heads/master@{#26993}
2015-03-04 15:21:21 +00:00
mstarzinger
d016387e81
[turbofan] Add test coverage for deopt within try-catch.
...
This just contains test, no fixes. Note that some of the tests are
still disabled because they either fail or we don't want ClusterFuzz
to pick up the flag yet.
R=jarin@chromium.org
TEST=cctest/test-run-jsexceptions/Deopt,mjsunit/compiler/try-deopt
Review URL: https://codereview.chromium.org/972943004
Cr-Commit-Position: refs/heads/master@{#26968}
2015-03-03 17:23:42 +00:00
Jaroslav Sevcik
f0b11873a3
[turbofan] Fix deferred replacement in simplified lowering.
...
Deferred replacement must also replace in the pending node vector.
BUG=chromium:463056
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/966423002
Cr-Commit-Position: refs/heads/master@{#26938}
2015-03-02 12:49:49 +00:00
titzer
d050c331eb
[turbofan] Simplify context specialization and fix for OSR.
...
AstGraphBuilder puts a constant context in from the beginning.
Also fix bug in merging contexts in environment.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/934293002
Cr-Commit-Position: refs/heads/master@{#26745}
2015-02-19 11:36:50 +00:00
titzer
71765afff9
[turbofan] Rename context stack as part of the environment for OSR.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/921083004
Cr-Commit-Position: refs/heads/master@{#26705}
2015-02-17 18:10:11 +00:00
jarin
0b8063cec8
[turbofan] Avoid ToNumber conversions if they could deoptimize.
...
BUG=chromium:454158
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/922623002
Cr-Commit-Position: refs/heads/master@{#26661}
2015-02-16 12:59:20 +00:00
titzer
31637fb396
[turbofan] Use heavy-handed graph duplication to do loop peeling for OSR.
...
BUG=
Review URL: https://codereview.chromium.org/898353002
Cr-Commit-Position: refs/heads/master@{#26576}
2015-02-11 13:26:45 +00:00
titzer
1db760de7d
Reduce the number of iterations in some OSR tests by using an explicit %OptimizeOsr().
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/913463002
Cr-Commit-Position: refs/heads/master@{#26540}
2015-02-10 09:53:22 +00:00
titzer
4c302ca290
Make it easier to test OSR with %OptimizeOsr() runtime call.
...
This call triggers OSR for the current function. And also allows explicitly testing OSR on the top-level code.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/906243002
Cr-Commit-Position: refs/heads/master@{#26523}
2015-02-09 12:47:43 +00:00
titzer
79cad15cb0
Speed up tests for OSR of for-in and for-of loops.
...
R=marja@chromium.org
BUG=
Review URL: https://codereview.chromium.org/889293003
Cr-Commit-Position: refs/heads/master@{#26378}
2015-02-02 11:52:07 +00:00
titzer
e25a0f7e4e
[turbofan] Fix usage of ThisFunction parameter in OSR.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/892593002
Cr-Commit-Position: refs/heads/master@{#26355}
2015-01-30 13:09:44 +00:00
titzer
11311c083a
[turbofan] Fix OSR compilations of for-in.
...
R=mstarzinger@chromium.org
LOG=Y
BUG=
Review URL: https://codereview.chromium.org/890543002
Cr-Commit-Position: refs/heads/master@{#26333}
2015-01-29 17:40:23 +00:00
jarin
a4b163a940
[turbofan] Make sure there is space for lazy deopt patching before the constant pool.
...
BUG=chromium:446647
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/874863003
Cr-Commit-Position: refs/heads/master@{#26327}
2015-01-29 15:30:32 +00:00
titzer
f5479ca675
[turbofan] Gracefully bail out if OSR encounters a loop too deeply nested.
...
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/877553007
Cr-Commit-Position: refs/heads/master@{#26318}
2015-01-29 09:46:36 +00:00
jarin
489b6f7c60
[turbofan] Add missing deopt for the assignment in the for-in statement.
...
BUG=chromium:416359
LOG=n
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/881303002
Cr-Commit-Position: refs/heads/master@{#26309}
2015-01-28 16:16:24 +00:00
jarin
b4a4c4c591
[turbofan] Only replace nodes eagerly during simplified lowering if the types stay the same.
...
BUG=chromium:452427
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/871373010
Cr-Commit-Position: refs/heads/master@{#26286}
2015-01-27 09:27:37 +00:00
jarin
4c79f55c32
[turbofan] Handle cyclic dependencies in context typing.
...
BUG=chromium:451012
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/874983002
Cr-Commit-Position: refs/heads/master@{#26281}
2015-01-27 06:57:41 +00:00
mstarzinger
209b771431
Enable test coverage for test coverage.
...
R=titzer@chromium.org
TEST=mjsunit/compiler/opt-next-call-turbo
Review URL: https://codereview.chromium.org/822673003
Cr-Commit-Position: refs/heads/master@{#26192}
2015-01-21 14:07:19 +00:00
Michael Starzinger
cecd89c2c6
Disable new test failing since 79748e3f7c
.
...
TBR=titzer@chromium.org
TEST=mjsunit/compiler/opt-next-call-turbo
Review URL: https://codereview.chromium.org/862533002
Cr-Commit-Position: refs/heads/master@{#26143}
2015-01-19 16:17:07 +00:00
mstarzinger
79748e3f7c
Remove overzealous check from %OptimizeFunctionOnNextCall.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/863443003
Cr-Commit-Position: refs/heads/master@{#26142}
2015-01-19 15:52:00 +00:00
jarin
ac04d777d6
[turbofan] Allow deoptimization for JSToNumber operator.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/841443004
Cr-Commit-Position: refs/heads/master@{#26053}
2015-01-14 13:09:32 +00:00
bmeurer
70b32e4b8a
[turbofan] Fix truncation/representation sloppiness wrt. bool/bit.
...
TEST=cctest,mjsunit,unittests
BUG=v8:3812
LOG=y
Review URL: https://codereview.chromium.org/850013003
Cr-Commit-Position: refs/heads/master@{#26051}
2015-01-14 12:06:56 +00:00
jarin
527e19afd5
[turbofan] Add missing deopt.
...
BUG=chromium:447567
LOG=n
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/809463005
Cr-Commit-Position: refs/heads/master@{#26033}
2015-01-13 08:40:54 +00:00
titzer
159b14172f
[turbofan] Implement OSR for outer loops.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/809333002
Cr-Commit-Position: refs/heads/master@{#26020}
2015-01-12 11:39:58 +00:00
bmeurer
fec1bba852
[turbofan] Correctify representation changes to bit.
...
TEST=cctest/test-representation-change,unittests,mjsunit/compiler/regress-bit-number-constant
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/840953003
Cr-Commit-Position: refs/heads/master@{#25987}
2015-01-08 09:48:41 +00:00
bmeurer
d1c1a3c48f
[turbofan] Fix bit representation of NumberConstant.
...
TEST=mjsunit/compiler/regress-bit-number-constant
Review URL: https://codereview.chromium.org/839813002
Cr-Commit-Position: refs/heads/master@{#25979}
2015-01-07 15:44:22 +00:00
jarin
80a7be5cd9
Restrict representation inference to avoid truncation of phi inputs.
...
BUG=chromium:446778
LOG=N
Review URL: https://codereview.chromium.org/837153002
Cr-Commit-Position: refs/heads/master@{#25967}
2015-01-07 11:38:54 +00:00
jarin
a9716d9840
Make control reducer revisit newly introduced merges.
...
TEST=mjsunit/compiler/regress-445876
BUG=chromium:445876
LOG=N
Review URL: https://codereview.chromium.org/830293003
Cr-Commit-Position: refs/heads/master@{#25959}
2015-01-05 16:35:34 +00:00
Benedikt Meurer
17a180842e
[turbofan] Don't crash when typing load from a Uint8ClampedArray.
...
TEST=mjsunit/compiler/regress-446156
BUG=chromium:446156
LOG=y
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/835883003
Cr-Commit-Position: refs/heads/master@{#25957}
2015-01-05 13:43:47 +00:00
jarin
bdf446f590
Do not reduce effect phis for loops.
...
This prevents eliminating effectful statements before the loop.
BUG=
Review URL: https://codereview.chromium.org/830923002
Cr-Commit-Position: refs/heads/master@{#25953}
2015-01-03 12:46:00 +00:00
bmeurer
fb2643c858
[turbofan] Truncation of Bit/Word8/16 to Word32 is a no-op.
...
TEST=mjsunit/compiler/regress-445859
BUG=chromium:445859
LOG=y
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/828313002
Cr-Commit-Position: refs/heads/master@{#25951}
2015-01-02 10:39:10 +00:00
bmeurer
cf866b7c61
[x64] Rearrange code for OOB integer loads.
...
We cannot just clear the result register optimistically, because the
register allocator might assign the same register to result and buffer.
TEST=mjsunit/compiler/regress-445858
BUG=chromium:445858
LOG=y
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/828303002
Cr-Commit-Position: refs/heads/master@{#25950}
2015-01-02 10:15:40 +00:00
bmeurer
a64ac4575a
Fix %NeverOptimizeFunction() intrinsic.
...
Set a valid reason for disabling optimization when using
%NeverOptimizeFunction.
TEST=mjsunit/compiler/regress-445732
BUG=chromium:445732
LOG=y
TBR=machenbach@chromium.org
Review URL: https://codereview.chromium.org/832003002
Cr-Commit-Position: refs/heads/master@{#25949}
2015-01-02 08:18:01 +00:00
bmeurer
ef41f70684
[turbofan] Fix invalid bounds check with overflowing offset.
...
TEST=mjsunit/compiler/regress-445267
BUG=chromium:445267
LOG=y
Review URL: https://codereview.chromium.org/825403002
Cr-Commit-Position: refs/heads/master@{#25945}
2014-12-29 10:01:15 +00:00
bmeurer
b5e8dd0e12
[turbofan] Raise max virtual registers and call parameter limit.
...
Change InstructionOperand to use a 64-bit field for encoding the operand
information instead of the 32-bit field that was used before. Ideally we
wouldn't use the Zone-allocated bit field at all, and use an integer
instead of the pointer; but that requires fixing the register allocator
first, which will take some time.
TEST=mjsunit/compiler/regress-3786
BUG=v8:3786
LOG=y
Review URL: https://codereview.chromium.org/826673002
Cr-Commit-Position: refs/heads/master@{#25941}
2014-12-25 18:18:04 +00:00
Benedikt Meurer
3f00ce2d59
[turbofan] Fix missing ChangeUint32ToUint64 in lowering of LoadBuffer.
...
TEST=mjsunit/compiler/regress-444695
BUG=chromium:444695
LOG=y
R=hpayer@chromium.org
Review URL: https://codereview.chromium.org/824843002
Cr-Commit-Position: refs/heads/master@{#25932}
2014-12-23 06:54:00 +00:00
Benedikt Meurer
65e69497ab
[turbofan] Correctify lowering of Uint8ClampedArray buffer access.
...
TEST=mjsunit/compiler/regress-444508.js
BUG=chromium:444508
LOG=y
R=machenbach@chromium.org
Review URL: https://codereview.chromium.org/794013004
Cr-Commit-Position: refs/heads/master@{#25916}
2014-12-22 08:27:59 +00:00
Benedikt Meurer
f7e4689061
[turbofan] Fix unsafe out-of-bounds check for checked loads/stores.
...
BUG=chromium:443744
LOG=y
TEST=mjsunit/compiler/regress-443744
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/804993004
Cr-Commit-Position: refs/heads/master@{#25901}
2014-12-19 12:53:29 +00:00
Benedikt Meurer
14409abc22
[turbofan] Quickfix for invalid number truncation of typed array loads.
...
TEST=mjsunit/compiler/regress-int32array-outofbounds-nan
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/803483002
Cr-Commit-Position: refs/heads/master@{#25793}
2014-12-12 10:45:38 +00:00
Benedikt Meurer
19418d76df
[x64] Fix optimization for certain checked load/stores.
...
BUG=chromium:439743
LOG=y
TEST=mjsunit
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/733893008
Cr-Commit-Position: refs/heads/master@{#25731}
2014-12-10 07:49:12 +00:00
Benedikt Meurer
48a6766e78
[x86] Disable invalid checked load/store optimization.
...
TEST=mjsunit/compiler/regress-lena
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/784153006
Cr-Commit-Position: refs/heads/master@{#25722}
2014-12-09 14:16:34 +00:00
jarin
322bb23e82
[turbofan] Insert appropriate conversions for typed array stores.
...
BUG=
Review URL: https://codereview.chromium.org/758643003
Cr-Commit-Position: refs/heads/master@{#25496}
2014-11-25 08:40:29 +00:00
svenpanne
be0fcaa2bc
Added test cases for truncating stores.
...
Review URL: https://codereview.chromium.org/741643003
Cr-Commit-Position: refs/heads/master@{#25474}
2014-11-24 10:42:26 +00:00
yangguo
61bee5c898
Correctly escape RegExp source.
...
R=ulan@chromium.org
BUG=v8:3229
LOG=N
Review URL: https://codereview.chromium.org/736003002
Cr-Commit-Position: refs/heads/master@{#25457}
2014-11-21 10:50:24 +00:00
danno@chromium.org
9a58807030
[turbofan] Optimize add operations to use 'leal' instruction on x64
...
Add MemoryOperandMatcher that recognizes node clusters in the form
[%r1 + %r2*SCALE + OFFSET] and explicit support in the x64 Int32Add
selector to use it to translate complex adds to 'leal' instructions.
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/704713003
Cr-Commit-Position: refs/heads/master@{#25223}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:47:45 +00:00
jarin@chromium.org
364cec0034
[turbofan] Fix deoptimization of uint8, uint16 inputs.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/707443003
Cr-Commit-Position: refs/heads/master@{#25214}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 14:07:45 +00:00
dcarney@chromium.org
a350f0d608
[turbofan] phis cannot take registers as inputs
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/704153002
Cr-Commit-Position: refs/heads/master@{#25191}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:56:44 +00:00
bmeurer@chromium.org
017c518321
[x86] Fix register constraints for multiply high and modulus.
...
R=jarin@chromium.org
TEST=mjsunit/compiler/regress-register-allocator2
Review URL: https://codereview.chromium.org/697053002
Cr-Commit-Position: refs/heads/master@{#25054}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 06:28:12 +00:00
bmeurer@chromium.org
548fb46331
[x86] Fix register constraints for multiply-high.
...
TEST=mjsunit/compiler,unittests
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/671393002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 09:36:40 +00:00
verwaest@chromium.org
23868b419c
Optimize Function.prototype.call
...
BUG=
R=verwaest@chromium.org , jarin@chromium.org , jkummerow@chromium.org
Review URL: https://codereview.chromium.org/588573002
Patch from Petka Antonov <p.antonov@partner.samsung.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 12:22:15 +00:00
jkummerow@chromium.org
b6f82c734c
Remove FLAG_opt_safe_uint32_operations.
...
It has been turned on by default for a long time, and hydrogenized BinaryOpStubs actually depend on it being turned on.
BUG=v8:3487
LOG=n
R=ishell@chromium.org
Review URL: https://codereview.chromium.org/630023002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 13:15:23 +00:00
titzer@chromium.org
cbf66711af
Minor compiler pipeline refactoring. Inline UpdateSharedFunctionInfo and make Parser::Parse responsible for setting the strict mode of the CompilationInfo.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/555553003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 12:34:46 +00:00
titzer@chromium.org
4c53bb086e
Fix more fallout from making OptimizeFunctionOnNextCall work as advertised.
...
R=jarin@chromium.org
BUG=411262
Review URL: https://codereview.chromium.org/544213002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 15:31:33 +00:00
titzer@chromium.org
67b89f9db6
Fix %OptimizeFunctionOnNextCall to actually work when the function has not yet been compiled.
...
R=yangguo@chromium.org
BUG=
Review URL: https://codereview.chromium.org/543643002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 11:27:20 +00:00
Jacob.Bramley@arm.com
da48f1246c
ARM64: Fix SHR logic error.
...
The `right == 0` checks only worked for `0 <= right < 32`. This patch
replaces the checks with simple tests for negative results.
The attached test can detect this error, but the test relies on a broken
flag (--noopt-safe-uint32-operations), so it is skipped for now. See
issue 3487 for details.
BUG=
R=ulan@chromium.org
Review URL: https://codereview.chromium.org/487913005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 14:58:18 +00:00
mstarzinger@chromium.org
7a4054b7d7
Allow inlining of functions containing %_Arguments.
...
R=svenpanne@chromium.org
TEST=mjsunit/compiler/inline-arguments
Review URL: https://codereview.chromium.org/356773002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-27 11:04:35 +00:00
dcarney@chromium.org
bd3f8a524e
Revert "Optimize Function.prototype.call"
...
This reverts commit r21840.
R=danno@chromium.org
LOG=y
BUG=chromium:385565
Review URL: https://codereview.chromium.org/347573002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-18 14:04:41 +00:00
verwaest@chromium.org
7005abf03b
Optimize Function.prototype.call
...
- May inline the function, or call it directly, instead of going through call
- Supports arguments object escaping when it escapes to builtins (preparation for slice.call(arguments, ...) optimization)
- Both .call and .apply now support inlining when calling builtins indirectly
BUG=
R=verwaest@chromium.org , rossberg@chromium.org
Review URL: https://codereview.chromium.org/335683002
Patch from Petka Antonov <p.antonov@partner.samsung.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-13 12:52:23 +00:00
hpayer@chromium.org
de21c8a245
Simplify ConfigureHeap and change --max_new_space_size to --max_semi_space_size.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/271843005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 08:38:27 +00:00
hpayer@chromium.org
dde49c9dc3
Set max new space size in tests to proper MB value.
...
Revert "Limit old space size in test which require a large new space."
This reverts commit r21103.
Revert "Remove max space limits in tests."
This reverts commit r21104.
BUG=
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/263103006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-05 16:48:33 +00:00
hpayer@chromium.org
56d0b9757e
Remove max space limits in tests.
...
BUG=
Review URL: https://codereview.chromium.org/263703003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 19:32:47 +00:00
hpayer@chromium.org
3dd05f8fc7
Limit old space size in test which require a large new space.
...
BUG=
Review URL: https://codereview.chromium.org/265673003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 18:57:25 +00:00
dslomov@chromium.org
f66af4feb4
Refactor optimized in hydrogen only runtime functions.
...
This splits all runtime function into 3 categories:
1) RUNTIME: implemented in runtime and called from both full and optimized code.
2) RUNTIME_HIDDEN: implemented in runtime, never called directly from JS builtins.
3) INLINE: inlined in both full and optimized code
4) INLINE_OPTIMIZED: inlined in optimized code, implemented in runtime for full code.
R=yangguo@chromium.org , yannguo@chromium.org
Review URL: https://codereview.chromium.org/209353006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 14:26:55 +00:00
titzer@chromium.org
3c31102025
First implementation of store elimination.
...
BUG=
R=hpayer@chromium.org
Review URL: https://codereview.chromium.org/100253004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 09:06:16 +00:00
ulan@chromium.org
2cb4e78e74
Fix mjsunit/compiler/concurrent-invalidate-transition-map.js test.
...
BUG=v8:3156
LOG=N
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/180053003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 17:00:48 +00:00
svenpanne@chromium.org
be328fd4ce
Disable special handling of flooring division by constant until it is fixed for real.
...
Added a test to check the various division-like operations more exhaustively.
R=bmeurer@chromium.org , ulan@chromium.org
Review URL: https://codereview.chromium.org/194863002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 14:28:59 +00:00
ishell@chromium.org
6bb57517c0
Restore of compare-objeq-elim test accidentally removed in r19229.
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/162903005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-13 12:22:24 +00:00
ulan@chromium.org
e95bc7eec8
Merge experimental/a64 to bleeding_edge.
...
BUG=v8:3113
LOG=Y
R=jochen@chromium.org , rmcilroy@chromium.org , rodolph.perfetta@arm.com
Review URL: https://codereview.chromium.org/148293020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 09:19:30 +00:00
ishell@chromium.org
994f0f6dda
Fix for a smi stores optimization on x64 with a test case.
...
BUG=338425
LOG=N
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/152923006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-11 16:02:18 +00:00
ishell@chromium.org
f46da9d43b
Reland of r19102: Check elimination improvement: propagation of state through phis is supported, CheckMap narrowing implemented with tests.
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/146623006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 15:32:54 +00:00
ishell@chromium.org
2aa17c6e62
Load elimination fix: load should not be replaced with another load if the former is not dominated by the latter.
...
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/151333003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-31 12:03:32 +00:00
jarin@chromium.org
99ce5a2484
The current
...
version is passing all the existing test + a bunch of new tests
(packaged in the change list, too).
The patch extends the SlotRef object to describe captured and duplicated
objects. Since the SlotRefs are not independent of each other anymore,
there is a new SlotRefValueBuilder class that stores the SlotRefs and
later materializes the objects from the SlotRefs.
Note that unlike the previous implementation of SlotRefs, we now build
the SlotRef entries for the entire frame, not just the particular
function. This is because duplicate objects might refer to previous
captured objects (that might live inside other inlined function's part
of the frame).
We also need to store the materialized objects between other potential
invocations of the same arguments object so that we materialize each
captured object at most once. The materialized objects of frames live
in the new MaterielizedObjectStore object (contained in Isolate),
indexed by the frame's FP address. Each argument materialization (and
deoptimization) tries to lookup its captured objects in the store before
building new ones. Deoptimization also removes the materialized objects
from the store. We also schedule a lazy deopt to be sure that we always
get rid of the materialized objects and that the optmized function
adopts the materialized objects (instead of happily computing with its
captured representations).
Concerns:
- Is the FP address the right key for a frame? (Note that deoptimizer's
representation of frame is different from the argument object
materializer's one - it is not easy to find common ground.)
- Performance is suboptimal in several places, but a quick local run of
benchmarks does not seem to show a perf hit. Examples of possible
improvements: smarter generation of SlotRefs (build other functions'
SlotRefs only for captured objects and only if necessary), smarter
lookup of stored materialized objects.
- Ideally, we would like to share the code for argument materialization
with deoptimizer's materializer. However, the supporting data structures
(mainly the frame descriptor) are quite different in each case, so it
looks more like a separate project.
Thanks for any feedback.
R=danno@chromium.org , mstarzinger@chromium.org
LOG=N
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=18918
Review URL: https://codereview.chromium.org/103243005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 10:33:53 +00:00
jarin@chromium.org
ec51f26b9e
Revert "Captured arguments object materialization"
...
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/130803009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:49:48 +00:00
jarin@chromium.org
868ad01ecb
This is a preview of the captured arguments object materialization,
...
mostly to make sure that it is going in the right direction. The current
version is passing all the existing test + a bunch of new tests
(packaged in the change list, too).
The patch extends the SlotRef object to describe captured and duplicated
objects. Since the SlotRefs are not independent of each other anymore,
there is a new SlotRefValueBuilder class that stores the SlotRefs and
later materializes the objects from the SlotRefs.
Note that unlike the previous implementation of SlotRefs, we now build
the SlotRef entries for the entire frame, not just the particular
function. This is because duplicate objects might refer to previous
captured objects (that might live inside other inlined function's part
of the frame).
We also need to store the materialized objects between other potential
invocations of the same arguments object so that we materialize each
captured object at most once. The materialized objects of frames live
in the new MaterielizedObjectStore object (contained in Isolate),
indexed by the frame's FP address. Each argument materialization (and
deoptimization) tries to lookup its captured objects in the store before
building new ones. Deoptimization also removes the materialized objects
from the store. We also schedule a lazy deopt to be sure that we always
get rid of the materialized objects and that the optmized function
adopts the materialized objects (instead of happily computing with its
captured representations).
Concerns:
- Is there a simpler/more correct way to store the already-materialized
objects? (At the moment there is a custom root reference to JSArray
containing frames' FixedArrays with their captured objects.)
- Is the FP address the right key for a frame? (Note that deoptimizer's
representation of frame is different from the argument object
materializer's one - it is not easy to find common ground.)
- Performance is suboptimal in several places, but a quick local run of
benchmarks does not seem to show a perf hit. Examples of possible
improvements: smarter generation of SlotRefs (build other functions'
SlotRefs only for captured objects and only if necessary), smarter
lookup of stored materialized objects.
- Ideally, we would like to share the code for argument materialization
with deoptimizer's materializer. However, the supporting data structures
(mainly the frame descriptor) are quite different in each case, so it
looks more like a separate project.
Thanks for any feedback.
R=mstarzinger@chromium.org , danno@chromium.org
LOG=N
BUG=
Review URL: https://codereview.chromium.org/103243005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:14:15 +00:00
ishell@chromium.org
d330d4801d
Load elimination fix with a test case.
...
R=titzer@chromium.org , verwaest@chromium.org
Review URL: https://codereview.chromium.org/143413019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-28 16:45:04 +00:00
machenbach@chromium.org
cde3ed1fe3
Speed up some mjsunit test cases and clean up test expectations for arm and mips.
...
Many skipped test cases already run very fast. Removing the corresponding expectations.
BUG=
R=jkummerow@chromium.org , mvstanton@chromium.org
Review URL: https://codereview.chromium.org/138503008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 11:36:45 +00:00
jarin@chromium.org
acf24331e3
Fixed Lithium environment generation bug for captured objects (created
...
by escape analysis). Added several tests that expose the bug.
Summary:
LCodegen::AddToTranslation assumes that Lithium environments are
generated by depth-first traversal, but LChunkBuilder::CreateEnvironment
was generating them in breadth-first fashion. This fixes the
CreateEnvironment to traverse the captured objects depth-first.
Note:
It might be worth considering representing LEnvironment by a list
with the same order as the serialized translation representation
rather than having two lists with a subtle relationship between
them (and then serialize in a slightly different order again).
R=titzer@chromium.org , mstarzinger@chromium.org
LOG=N
BUG=
Review URL: https://codereview.chromium.org/93803003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 14:36:26 +00:00
yangguo@chromium.org
2a4be7067c
Refactor the compiling pipeline.
...
Goals:
- easier to read, more suitable identifiers.
- better distinction between compiling optimized/unoptimized code
- compiler does not install code on the function.
- easier to add features (e.g. caching optimized code for osr).
- remove unnecessary code.
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/110203002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 14:30:35 +00:00
titzer@chromium.org
be32761a67
Improve load elimination handling of transitioning stores.
...
BUG=
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/106973005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 12:12:41 +00:00
titzer@chromium.org
1f679a58f7
Improve check elimination with branch sensitivity on HCompareObjectEqAndBranch.
...
BUG=
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/106733002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-19 17:42:21 +00:00
titzer@chromium.org
1d6710c933
Add some test cases with dead loops.
...
BUG=
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/98323004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-03 18:04:45 +00:00
titzer@chromium.org
16c4c14fac
Check elimination: Learn from if(CompareMap(x)) on true branch.
...
BUG=
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/99043002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-02 18:34:33 +00:00