bmeurer
dd6ce12645
[turbofan] Turn IrOpcode::IsXXX() into range checks.
...
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/807573004
Cr-Commit-Position: refs/heads/master@{#26079}
2015-01-15 15:07:39 +00:00
bmeurer
4914716387
Revert of [turbofan] Use PlainPrimitiveToNumber whenever possible. (patchset #1 id:1 of https://codereview.chromium.org/852763002/ )
...
Reason for revert:
Tanks performance of SQLite and towers.c.
Original issue's description:
> [turbofan] Use PlainPrimitiveToNumber whenever possible.
>
> TEST=cctest,unittests
> R=jarin@chromium.org
>
> Committed: https://crrev.com/1a5db24e6bf831e61e3f4aa0c252f77e48c3689c
> Cr-Commit-Position: refs/heads/master@{#26071}
TBR=jarin@chromium.org ,dcarney@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/852153003
Cr-Commit-Position: refs/heads/master@{#26078}
2015-01-15 13:26:55 +00:00
bmeurer
1a5db24e6b
[turbofan] Use PlainPrimitiveToNumber whenever possible.
...
TEST=cctest,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/852763002
Cr-Commit-Position: refs/heads/master@{#26071}
2015-01-15 09:49:23 +00:00
dcarney
e6552d4917
Reland "[turbofan] simplify gap ordering"
...
BUG=
Review URL: https://codereview.chromium.org/854703002
Cr-Commit-Position: refs/heads/master@{#26069}
2015-01-15 09:06:05 +00:00
dcarney
a7e3c71b23
add register allocator regression test
...
BUG=
Review URL: https://codereview.chromium.org/852633002
Cr-Commit-Position: refs/heads/master@{#26068}
2015-01-15 08:56:10 +00:00
baptiste.afsa
51f3c66b64
[turbofan] Allow 0.0 as immediate for floating-point comparison on arm/arm64.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/850073002
Cr-Commit-Position: refs/heads/master@{#26066}
2015-01-15 06:31:07 +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
bmeurer
214387fce1
Revert of [turbofan] Improve typed lowering of JSBitwiseAnd. (patchset #1 id:1 of https://codereview.chromium.org/811653004/ )
...
Reason for revert:
Breaks SQLite
Original issue's description:
> [turbofan] Improve typed lowering of JSBitwiseAnd.
>
> TEST=unittests
> R=jarin@chromium.org
>
> Committed: https://crrev.com/284e1108182995abe85f580bc813d26491642b8c
> Cr-Commit-Position: refs/heads/master@{#26046}
TBR=jarin@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/795833006
Cr-Commit-Position: refs/heads/master@{#26048}
2015-01-14 09:07:07 +00:00
Benedikt Meurer
284e110818
[turbofan] Improve typed lowering of JSBitwiseAnd.
...
TEST=unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/811653004
Cr-Commit-Position: refs/heads/master@{#26046}
2015-01-14 07:40:32 +00:00
balazs.kilvady
3da5a729e8
MIPS: [turbofan] Improve code generation for unordered comparisons.
...
Port c24220c0c1
TEST=cctest,unittests
BUG=
Review URL: https://codereview.chromium.org/850733004
Cr-Commit-Position: refs/heads/master@{#26045}
2015-01-13 20:28:13 +00:00
bmeurer
1fa21bfd39
[turbofan] Reduce Word32And masking with shifted inputs.
...
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/847113002
Cr-Commit-Position: refs/heads/master@{#26040}
2015-01-13 13:02:40 +00:00
bmeurer
9f292086f9
[turbofan] Add PlainPrimitiveToNumber simplified operator.
...
TEST=unittests
Review URL: https://codereview.chromium.org/845333002
Cr-Commit-Position: refs/heads/master@{#26038}
2015-01-13 11:02:57 +00:00
bmeurer
c24220c0c1
[turbofan] Improve code generation for unordered comparisons.
...
TEST=cctest,unittests
Review URL: https://codereview.chromium.org/850653002
Cr-Commit-Position: refs/heads/master@{#26034}
2015-01-13 08:42:02 +00:00
bmeurer
0e8a6d4ec8
[turbofan] Canonicalize x - K to x + -K.
...
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/846913002
Cr-Commit-Position: refs/heads/master@{#26027}
2015-01-12 15:02:06 +00:00
bmeurer
b6c7e11c10
[turbofan] Fix typo in IrOpcode::Mnemonic.
...
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/843043002
Cr-Commit-Position: refs/heads/master@{#26014}
2015-01-09 14:20:03 +00:00
bmeurer
5157472539
[turbofan] Cleanup duplicated/unused code in InstructionSelector.
...
- Use C++11 range based for loops.
- Remove duplicated virtual register set in unittests.
- Don't expose implementation details of InstructionSelector.
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/837423002
Cr-Commit-Position: refs/heads/master@{#25997}
2015-01-08 14:13:33 +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
e53845d41c
[turbofan] Cleanup Graph and related classes.
...
- Move NodeMarker to its own file, and introduce a non
templatized base class.
- Cleanup the include hell.
- Sanitize the Node construction methods now that we
got rid of that GenericNode/GenericGraph stuff.
- Protect against NodeId overflow in Graph.
- Various minor cleanups.
TEST=cctest,mjsunit,unittests
Review URL: https://codereview.chromium.org/838783002
Cr-Commit-Position: refs/heads/master@{#25977}
2015-01-07 14:42:49 +00:00
bmeurer
ec35c52e54
[turbofan] Generalize constant propagation.
...
Also support additional number types (singleton ranges, NaN and minus
zero) for constant propagation in typed lowering.
TEST=unittests
Review URL: https://codereview.chromium.org/829303002
Cr-Commit-Position: refs/heads/master@{#25963}
2015-01-07 08:24:38 +00:00
Benedikt Meurer
9def087efc
[turbofan] Correctify JSToBoolean lowering.
...
Introduce a new AnyToBoolean simplified operator to handle the later
lowering of boolean conversions. Previously we tried to hack that with
the generic JSToBoolean, having its context set to zero, but that lead
to various problems/bugs and did not handle all cases.
TEST=cctest,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/800833003
Cr-Commit-Position: refs/heads/master@{#25958}
2015-01-05 13:44:31 +00:00
bmeurer
c329a49d69
[turbofan] Fix incorrect minus zero handling in the unit tests.
...
TEST=unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/831203003
Cr-Commit-Position: refs/heads/master@{#25956}
2015-01-05 12:29:27 +00:00
bmeurer
643ed5b8be
[turbofan] Fix missing MachineOperator unittest.
...
The machine-operator-unittest.cc file was missing from unittests.gyp.
Fixed the compiler errors and added it back.
TBR=machenbach@chromium.org
Review URL: https://codereview.chromium.org/824243003
Cr-Commit-Position: refs/heads/master@{#25948}
2015-01-02 07:44:52 +00:00
bmeurer
eeec886e5f
[turbofan] Deinlinify OperatorProperties implementation.
...
TEST=cctest,unittests
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/821913002
Cr-Commit-Position: refs/heads/master@{#25935}
2014-12-23 12:50:51 +00:00
bmeurer
00013a5692
[turbofan] Minor cleanup to reduce code duplication.
...
TEST=unittests
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/819103002
Cr-Commit-Position: refs/heads/master@{#25927}
2014-12-22 14:37:22 +00:00
Benedikt Meurer
1ec1f5957f
[turbofan] Cleanup use of virtual, OVERRIDE, FINAL.
...
Following the Google/Chromium coding style wrt. virtual, OVERRIDE and
FINAL specifications.
TEST=unittests
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/816453005
Cr-Commit-Position: refs/heads/master@{#25924}
2014-12-22 13:48:10 +00:00
Benedikt Meurer
ee98a1d760
[turbofan] Introduce CommonOperatorReducer.
...
The CommonOperatorReducer currently takes care of redundant Phis,
EffectPhis and Selects. This functionality overlaps with ControlReducer,
but is required to make certain optimizations effective, since the
ControlReducer only runs really early and really late in the pipeline
and therefore other reducers aren't reapplied properly after redundant
phi/select elimination.
TEST=unittests
R=hpayer@chromium.org
Review URL: https://codereview.chromium.org/817243003
Cr-Commit-Position: refs/heads/master@{#25922}
2014-12-22 13:06:43 +00:00
machenbach
7d478d9621
Revert of Remove obsolete V8_INFINITY macro. (patchset #3 id:40001 of https://codereview.chromium.org/798413003/ )
...
Reason for revert:
Speculative revert. This seems to block the current roll: https://codereview.chromium.org/819653003/
I retried several times, also with a new roll. The error is internal - but that doesn't make much of a difference.
Original issue's description:
> Remove obsolete V8_INFINITY macro.
>
> Use std::numeric_limits consistently.
>
> R=svenpanne@chromium.org
>
> Committed: https://crrev.com/31c66e2d53569c4e229d55483d28208491e73612
> Cr-Commit-Position: refs/heads/master@{#25897}
TBR=svenpanne@chromium.org ,bmeurer@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/813813003
Cr-Commit-Position: refs/heads/master@{#25912}
2014-12-20 13:17:35 +00:00
bmeurer
31c66e2d53
Remove obsolete V8_INFINITY macro.
...
Use std::numeric_limits consistently.
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/798413003
Cr-Commit-Position: refs/heads/master@{#25897}
2014-12-19 07:18:00 +00:00
machenbach
1f44e7267e
Revert of [turbofan] simplify gap ordering (patchset #2 id:20001 of https://codereview.chromium.org/810013002/ )
...
Reason for revert:
Revert for breaking emscripten bullet with turbofan on android arm64.
Original issue's description:
> [turbofan] simplify gap ordering
>
> BUG=
>
> Committed: https://crrev.com/70b5eb47b39acbf31746f4a116a9b3ce2730218a
> Cr-Commit-Position: refs/heads/master@{#25865}
TBR=bmeurer@chromium.org ,dcarney@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/815743002
Cr-Commit-Position: refs/heads/master@{#25888}
2014-12-18 15:49:58 +00:00
machenbach
70eb456e73
Revert of [turbofan] remove control field from instruction (patchset #1 id:1 of https://codereview.chromium.org/810023002/ )
...
Reason for revert:
Needed to revert 70b5eb47b3
Original issue's description:
> [turbofan] remove control field from instruction
>
> R=titzer@chromium.org
> BUG=
>
> Committed: https://crrev.com/7b9cb2eb3764d0c807c669e397fc3b84fbefb175
> Cr-Commit-Position: refs/heads/master@{#25866}
TBR=titzer@chromium.org ,dcarney@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/814043002
Cr-Commit-Position: refs/heads/master@{#25884}
2014-12-18 14:42:16 +00:00
Benedikt Meurer
0925be14a2
[turbofan] Further reduction of Word32And with Int32Add.
...
- (y * (K << L) + x) & (-1 << L) => (x & (-1 << L)) + y * (K << L)
- (x + y * (K << L)) & (-1 << L) => (x & (-1 << L)) + y * (K << L)
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/811293002
Cr-Commit-Position: refs/heads/master@{#25875}
2014-12-18 08:42:57 +00:00
dcarney
44e2dd535e
[turbofan] move assembly order to InstructionBlock
...
R=titzer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/805263003
Cr-Commit-Position: refs/heads/master@{#25867}
2014-12-17 15:10:03 +00:00
dcarney
7b9cb2eb37
[turbofan] remove control field from instruction
...
R=titzer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/810023002
Cr-Commit-Position: refs/heads/master@{#25866}
2014-12-17 14:10:46 +00:00
dcarney
70b5eb47b3
[turbofan] simplify gap ordering
...
BUG=
Review URL: https://codereview.chromium.org/810013002
Cr-Commit-Position: refs/heads/master@{#25865}
2014-12-17 13:37:56 +00:00
dcarney
84345afbfb
[turbofan] use START and END gap positions for constraints
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/798363007
Cr-Commit-Position: refs/heads/master@{#25864}
2014-12-17 12:13:58 +00:00
Benedikt Meurer
a7d8724188
[turbofan] Improve reduction of Word32And and Int32Add.
...
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/816433002
Cr-Commit-Position: refs/heads/master@{#25863}
2014-12-17 11:34:39 +00:00
bmeurer
5a8be47d21
Revert of [turbofan] Correctify TruncateFloat64ToInt32 reduction in MachineOperatorReducer. (patchset #1 id:1 of https://codereview.chromium.org/801263002/ )
...
Reason for revert:
Can cause reduce cycles, needs more investigation
Original issue's description:
> [turbofan] Correctify TruncateFloat64ToInt32 reduction in MachineOperatorReducer.
>
> TEST=unittests
> R=svenpanne@chromium.org
>
> Committed: 6e7ceee4d0
TBR=svenpanne@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/794473003
Cr-Commit-Position: refs/heads/master@{#25859}
2014-12-17 09:51:17 +00:00
Benedikt Meurer
2b4eb88cdd
[turbofan] Cache conversions inserted during typed lowering.
...
This greatly reduces the number of nodes in the graph (by more than 20x in
some extreme cases) for the Emscripten python interpreter main function.
BUG=v8:3763
LOG=y
TEST=cctest,mjsunit,unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/802353003
Cr-Commit-Position: refs/heads/master@{#25840}
2014-12-16 12:59:16 +00:00
Benedikt Meurer
283175d984
[turbofan] Relax effects and context for JSToNumber(x:plain-primitive).
...
Relanded with fix for always returning Change for PlainPrimitive even
if there was no change. The performance regression on primes.js and
corrections.js is due to unlucky loop header alignment; will be addressed
separately.
TEST=unittests
R=svenpanne@chromium.org
Committed: 75484e8d16
Review URL: https://codereview.chromium.org/799413002
Cr-Commit-Position: refs/heads/master@{#25832}
2014-12-16 05:39:46 +00:00
bmeurer
2c30ab6616
Revert of [turbofan] Relax effects and context for JSToNumber(x:plain-primitive). (patchset #1 id:1 of https://codereview.chromium.org/799413002/ )
...
Reason for revert:
Performance regressions on primes and corrections benchmarks.
Original issue's description:
> [turbofan] Relax effects and context for JSToNumber(x:plain-primitive).
>
> TEST=unittests
> R=svenpanne@chromium.org
>
> Committed: 75484e8d16
TBR=svenpanne@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/806103002
Cr-Commit-Position: refs/heads/master@{#25831}
2014-12-16 04:45:09 +00:00
Benedikt Meurer
75484e8d16
[turbofan] Relax effects and context for JSToNumber(x:plain-primitive).
...
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/799413002
Cr-Commit-Position: refs/heads/master@{#25818}
2014-12-15 13:42:54 +00:00
Benedikt Meurer
6e7ceee4d0
[turbofan] Correctify TruncateFloat64ToInt32 reduction in MachineOperatorReducer.
...
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/801263002
Cr-Commit-Position: refs/heads/master@{#25812}
2014-12-15 07:46:21 +00:00
danno
10b38df268
[turbofan]: Fix x64 regression during ia32 lea port
...
Review URL: https://codereview.chromium.org/795353008
Cr-Commit-Position: refs/heads/master@{#25807}
2014-12-12 18:17:01 +00:00
dcarney
3595176565
[turbofan] improve register allocator testing framework
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/800493002
Cr-Commit-Position: refs/heads/master@{#25794}
2014-12-12 11:15:26 +00:00
svenpanne
71bb00e261
Consistently use only one of virtual/OVERRIDE/FINAL.
...
FINAL implies OVERRIDE, which in turn implies virtual, so there's no need to use
more than one of these. The Google C++ style guide even requires this, see
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Inheritance .
While we're here, port r24662 to x87.
The net result is that v8 compiles again with a current clang.
BUG=v8:3753
LOG=y
Review URL: https://codereview.chromium.org/797943002
Cr-Commit-Position: refs/heads/master@{#25792}
2014-12-12 10:44:25 +00:00
jarin
5913c7cc3f
Reland of "Avoid number range holes in bitset types."
...
This reverts commit 8a6cbf0a86
.
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/788313002
Cr-Commit-Position: refs/heads/master@{#25786}
2014-12-11 17:50:11 +00:00
baptiste.afsa
49baecc42b
[turbofan] Mark arm64 cbz/cbnz tbz/tbnz instructions as branch instructions.
...
The instruction selector now selects pseudo instructions: CompareAndBranch or
TestAndBranch which are associated with their continuations so that generic
code in the code generator will treat them as branch instruction and will be
able to apply optimization like avoiding branches when the code can falltrhough.
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/798553002
Cr-Commit-Position: refs/heads/master@{#25773}
2014-12-11 12:45:33 +00:00
danno
2f7a5af0e3
[turbofan]: Port lea changes to ia32
...
Review URL: https://codereview.chromium.org/747283005
Cr-Commit-Position: refs/heads/master@{#25771}
2014-12-11 11:53:00 +00:00
jarin
8a6cbf0a86
Revert of Avoid number range holes in bitset types. (patchset #5 id:80001 of https://codereview.chromium.org/759013003/ )
...
Reason for revert:
For breaking the waterfall (run-json-stringify test).
Original issue's description:
> Avoid number range holes in bitset types.
>
> BUG=
TBR=rossberg@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/794663002
Cr-Commit-Position: refs/heads/master@{#25756}
2014-12-10 18:25:38 +00:00
jarin
4de4f74cf2
Avoid number range holes in bitset types.
...
BUG=
Review URL: https://codereview.chromium.org/759013003
Cr-Commit-Position: refs/heads/master@{#25754}
2014-12-10 16:39:10 +00:00