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
dcarney
aae665862f
[turbofan] delay inserting spill slots for parent ranges.
...
R=jarin@chromium.org ,
BUG=
Review URL: https://codereview.chromium.org/785993002
Cr-Commit-Position: refs/heads/master@{#25736}
2014-12-10 09:46:01 +00:00
bmeurer
baafb8f92e
[turbofan] Turn JSToBoolean and JSUnaryNot into pure operators.
...
Also fix the pushing of JSToBoolean into Phis and generalize it to
also include pushing into Selects.
TEST=cctest,unittests
Review URL: https://codereview.chromium.org/792463003
Cr-Commit-Position: refs/heads/master@{#25718}
2014-12-09 07:35:12 +00:00
danno
85d2db8781
[turbofan] Use "leal" in even more situations
...
Achieve more than parity with modes currently handled on ia32 in preparation for
porting the entire mechanism to ia32, including supporting mul of constants 3,
5 and 9 with "leal" instructions.
TEST=unittests
Review URL: https://codereview.chromium.org/774193003
Cr-Commit-Position: refs/heads/master@{#25677}
2014-12-05 10:54:40 +00:00
Benedikt Meurer
b3ace35209
[turbofan] Redundant load elimination.
...
This is an initial version of redundant load elimination, currently
limited to LoadField operators, and implemented by walking the effect
chain.
TEST=unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/782473002
Cr-Commit-Position: refs/heads/master@{#25673}
2014-12-05 07:59:18 +00:00
Benedikt Meurer
2bf048f46c
[turbofan] Reduce context accesses during typed lowering.
...
TEST=unittests
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/776243002
Cr-Commit-Position: refs/heads/master@{#25656}
2014-12-04 10:50:58 +00:00
Benedikt Meurer
2983d84e5c
[turbofan] Combine additional Word32And with Int32Add and negative power of two.
...
- (y << L + x) & (-1 << L) => (x & (-1 << L)) + y << L
- (x + y << L) & (-1 << L) => (x & (-1 << L)) + y << L
TEST=unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/758603003
Cr-Commit-Position: refs/heads/master@{#25627}
2014-12-03 07:35:03 +00:00
mstarzinger
f9e4527f32
Restrict floating control to minimal control-connected component.
...
R=jarin@chromium.org
TEST=cctest/test-scheduler/NestedFloatingDiamondWithChain
Review URL: https://codereview.chromium.org/738613005
Cr-Commit-Position: refs/heads/master@{#25621}
2014-12-02 15:56:30 +00:00
Benedikt Meurer
a94a612220
[turbofan] Cache the JSStoreProperty operator(s).
...
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/769193003
Cr-Commit-Position: refs/heads/master@{#25609}
2014-12-02 11:40:32 +00:00
Benedikt Meurer
d33cabea57
[turbofan] Add missing tests for SimplifiedOperatorBuilder.
...
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/772723003
Cr-Commit-Position: refs/heads/master@{#25605}
2014-12-02 11:10:55 +00:00