Commit Graph

53 Commits

Author SHA1 Message Date
bmeurer
0231a7efa2 [turbofan] Introduce TruncateTaggedToWord32 simplified operator.
This allows us to get rid of the "push TruncateFloat64ToInt32 into Phi"
trick that was used in the MachineOperatorReducer to combine the
ChangeTaggedToFloat64 and TruncateFloat64ToInt32 operations. Instead of
doing that later, we can just introduce the proper operator during the
representation selection directly.

Also separate the TruncateFloat64ToInt32 machine operator, which had two
different meanings depending on a flag (either JavaScript truncation or
C++ style round to zero). Now there's a TruncateFloat64ToWord32 which
represents the JavaScript truncation (implemented via TruncateDoubleToI
macro + code stub) and the RoundFloat64ToInt32, which implements the C++
round towards zero operation (in the same style as the other WebAssembly
driven Round* machine operators).

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/1919513002

Cr-Commit-Position: refs/heads/master@{#35743}
2016-04-24 11:41:20 +00:00
jarin
56673804e0 [turbofan] Store nodes use only MachineRepresentation, not MachineType.
Review URL: https://codereview.chromium.org/1513383003

Cr-Commit-Position: refs/heads/master@{#32803}
2015-12-11 15:34:16 +00:00
jarin
bb2a830deb [turbofan] Make MachineType a pair of enums.
MachineType is now a class with two enum fields:
- MachineRepresentation
- MachineSemantic

Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably:
- register allocator now uses just the representation.
- Phi and Select nodes only refer to representations.

Review URL: https://codereview.chromium.org/1513543003

Cr-Commit-Position: refs/heads/master@{#32738}
2015-12-10 09:03:53 +00:00
bmeurer
5d18e93bd6 Revert of binary-operator-reducer: reduce mul+div(shift) (patchset #11 id:200001 of https://codereview.chromium.org/1350223006/ )
Reason for revert:
This is also unsound for the reasons outlined in
https://codereview.chromium.org/1473073004/
Will help Fedor to implement a solution based on simplified operators.

Original issue's description:
> binary-operator-reducer: reduce mul+div(shift)
>
> Reduction Input:
>
>     ChangeInt32ToFloat64=>          TruncateFloat64ToInt32
>                          Float64Mul=>
>     ChangeInt32ToFloat64=>          Float64Div=>TruncateFloat64ToInt32
>
> Output:
>
>          =>  TruncateInt64ToInt32
> Int64Mul
>          =>  Int64Shr => TruncateInt64ToInt32
>
> Test code:
>
>     function mul(a, b) {
>       var l = a & 0x3ffffff;
>       var h = b & 0x3ffffff;
>       var m = l * h;
>
>       var rl = m & 0x3ffffff;
>       var rh = (m / 0x4000000) | 0;
>
>       return rl | rh;
>     }
>
>     mul(1, 2);
>     var a0 = mul(0x3ffffff, 0x3ffffff);
>     mul(0x0, 0x0);
>     %OptimizeFunctionOnNextCall(mul);
>     var a1 = mul(0x3ffffff, 0x3ffffff);
>
>     print(a0 + ' == ' + a1);
>
> BUG=
> R=mstarzinger@chromium.org
>
> Committed: https://crrev.com/461e5b49d022335a7fc4e9d172397a4bd48b93d4
> Cr-Commit-Position: refs/heads/master@{#31899}

TBR=mstarzinger@chromium.org,danno@chromium.org,titzer@chromium.org,fedor@indutny.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1478923002

Cr-Commit-Position: refs/heads/master@{#32313}
2015-11-26 06:16:01 +00:00
bmeurer
dc55405992 Revert of [machine-operator-reducer] fix float truncation (patchset #8 id:140001 of https://codereview.chromium.org/1433353006/ )
Reason for revert:
This is also unsound for the reasons outlined in
https://codereview.chromium.org/1473073004/
Will reland the mjsunit test separately and help Fedor to implement a solution based on simplified operators.

Original issue's description:
> [machine-operator-reducer] fix float truncation
>
> Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with
> `value`. Generally, `value` may have a range bigger than the one that
> could fit into Int32. Replace it with `TruncateInt64ToInt32(value)`
> instead, and only if the `value` fits into Float64 without precision
> loss.
>
> Add missing mjsunit test for 52bit multiplication/division optimization
> that has landed in refs/heads/master@{#31899}.
>
> BUG=
> R=titzer@google.com
>
> Committed: https://crrev.com/64efa2a904773816968992628f0bf0f1b7ae82be
> Cr-Commit-Position: refs/heads/master@{#32227}

TBR=titzer@chromium.org,fedor@indutny.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1468313009

Cr-Commit-Position: refs/heads/master@{#32312}
2015-11-26 06:12:22 +00:00
bmeurer
b0c179daf6 Revert of [compiler] merge binary-operator-reducer (patchset #2 id:20001 of https://codereview.chromium.org/1473073004/ )
Reason for revert:
Unsound use of types in the MachineOperatorReducer. Will work on a sound solution with Fedor.

Original issue's description:
> [compiler] merge binary-operator-reducer
>
> Merge BinaryOperatorReducer into the MachineOperatorReducer class.
> It does not need `Revisit()` calls, because the newly inserted nodes are
> visited anyway, and there are no other methods that need AdvancedReducer
> there.
>
> BUG=
> R=titzer@chromium.org
>
> Committed: https://crrev.com/993ba9d2529a6401b3040b9263f8d06db7dbb4f1
> Cr-Commit-Position: refs/heads/master@{#32298}

TBR=titzer@chromium.org,fedor@indutny.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1476763006

Cr-Commit-Position: refs/heads/master@{#32310}
2015-11-26 03:52:30 +00:00
fedor
993ba9d252 [compiler] merge binary-operator-reducer
Merge BinaryOperatorReducer into the MachineOperatorReducer class.
It does not need `Revisit()` calls, because the newly inserted nodes are
visited anyway, and there are no other methods that need AdvancedReducer
there.

BUG=
R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1473073004

Cr-Commit-Position: refs/heads/master@{#32298}
2015-11-25 19:25:17 +00:00
fedor
64efa2a904 [machine-operator-reducer] fix float truncation
Don't replace `TruncateFloat64ToInt32(RoundInt64ToFloat64(value))` with
`value`. Generally, `value` may have a range bigger than the one that
could fit into Int32. Replace it with `TruncateInt64ToInt32(value)`
instead, and only if the `value` fits into Float64 without precision
loss.

Add missing mjsunit test for 52bit multiplication/division optimization
that has landed in refs/heads/master@{#31899}.

BUG=
R=titzer@google.com

Review URL: https://codereview.chromium.org/1433353006

Cr-Commit-Position: refs/heads/master@{#32227}
2015-11-24 20:25:40 +00:00
fedor
461e5b49d0 binary-operator-reducer: reduce mul+div(shift)
Reduction Input:

    ChangeInt32ToFloat64=>          TruncateFloat64ToInt32
                         Float64Mul=>
    ChangeInt32ToFloat64=>          Float64Div=>TruncateFloat64ToInt32

Output:

         =>  TruncateInt64ToInt32
Int64Mul
         =>  Int64Shr => TruncateInt64ToInt32

Test code:

    function mul(a, b) {
      var l = a & 0x3ffffff;
      var h = b & 0x3ffffff;
      var m = l * h;

      var rl = m & 0x3ffffff;
      var rh = (m / 0x4000000) | 0;

      return rl | rh;
    }

    mul(1, 2);
    var a0 = mul(0x3ffffff, 0x3ffffff);
    mul(0x0, 0x0);
    %OptimizeFunctionOnNextCall(mul);
    var a1 = mul(0x3ffffff, 0x3ffffff);

    print(a0 + ' == ' + a1);

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/1350223006

Cr-Commit-Position: refs/heads/master@{#31899}
2015-11-09 20:42:39 +00:00
mstarzinger
b7990793cf [turbofan] Move SimplifiedOperatorBuilder into JSGraph.
This fixes the lifetime of nodes created by JSGlobalSpecialization that
contain a simplified operator. In the case where this reducer runs as
part of the inliner, the SimplifiedOperatorBuilder was instantiated with
the wrong zone. This led to use-after-free of simplified operators.

To avoid such situations in the future, we decided to move this operator
builder into the JSGraph and make the situation uniform with all other
operator builders.

R=bmeurer@chromium.org
BUG=chromium:543528
LOG=n

Review URL: https://codereview.chromium.org/1409993002

Cr-Commit-Position: refs/heads/master@{#31334}
2015-10-16 12:38:52 +00:00
martyn.capewell
809f6b15be [turbofan] Elide fp32 convert for const compares
Reduce operations of the form f64cmp(fp32to64(x), k) to f32cmp(x, k) when k
can be encoded as a 32-bit float.

Review URL: https://codereview.chromium.org/1365623002

Cr-Commit-Position: refs/heads/master@{#30909}
2015-09-24 11:24:33 +00:00
jarin
a86db19e0a [turbofan] Limit the load/store machine types to the ones we actually use.
Review URL: https://codereview.chromium.org/1333353005

Cr-Commit-Position: refs/heads/master@{#30725}
2015-09-15 05:45:30 +00:00
mstarzinger
c87bd340af [turbofan] Remove obsolete unique.h includes in TurboFan.
Now that it is no longer needed, this also removes the invalid inclusion
of "object-inl.h" within the "unique.h" header file.

Note that this change still leaves 2 violations of that rule in the
code, checked with the "tools/check-inline-includes.sh" tool.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1321223002

Cr-Commit-Position: refs/heads/master@{#30503}
2015-09-01 10:30:57 +00:00
martyn.capewell
ad7f35c49a [turbofan] Reduce Float64 comparison to Float32.
Reduce Float64 comparison to Float32 when both inputs are conversions from
Float32.

Review URL: https://codereview.chromium.org/1235663002

Cr-Commit-Position: refs/heads/master@{#29586}
2015-07-13 05:23:53 +00:00
bmeurer
4b38c15817 [turbofan] Add TruncationMode for TruncateFloat64ToInt32.
We actually need round to zero truncation to implement the counterpart
of LDoubleToI in TurboFan, which tries to convert a double to an integer
as required for keyed load/store optimizations.

Drive-by-cleanup: Reduce some code duplication in the InstructionSelector
implementations.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/1225993002

Cr-Commit-Position: refs/heads/master@{#29527}
2015-07-08 06:49:00 +00:00
Ross McIlroy
063fc25122 Replace OVERRIDE->override and FINAL->final since we now require C++11.
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1088993003

Cr-Commit-Position: refs/heads/master@{#27937}
2015-04-20 13:08:14 +00:00
bmeurer
4436c2642a [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble.
This adds support for the double bits intrinsics to TurboFan, and is
a first step towards fast Math functions inlined into TurboFan code
or even compiled by themselves with TurboFan.

Review URL: https://codereview.chromium.org/974313002

Cr-Commit-Position: refs/heads/master@{#27006}
2015-03-05 09:22:38 +00:00
Benedikt Meurer
e1c2c9016e [turbofan] Strength reduction of Word32And with Int32Mul.
- (x * (K << L)) & (-1 << L) => x * (K << L)
- ((K << L) * x) & (-1 << L) => x * (K << L)

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/972653002

Cr-Commit-Position: refs/heads/master@{#26942}
2015-03-02 13:54:09 +00:00
bmeurer
dcf193f18c [turbofan] Strength reduction for inline comparisons.
Perform strength reduction on machine operators with inline comparisons:

  CMP & 1 => CMP
  1 & CMP => CMP
  CMP << 31 >> 31 => CMP

Also strength reduce the following constructs:

  x + (0 - y) => x - y
  (0 - y) + x => x - y

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/951903003

Cr-Commit-Position: refs/heads/master@{#26817}
2015-02-24 12:26:29 +00:00
danno
c7b09aac31 Remove the dependency of Zone on Isolate
Along the way:
- Thread isolate parameter explicitly through code that used to
  rely on getting it from the zone.
- Canonicalize the parameter position of isolate and zone for
  affected code
- Change Hydrogen New<> instruction templates to automatically
  pass isolate

R=mstarzinger@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/868883002

Cr-Commit-Position: refs/heads/master@{#26252}
2015-01-23 15:20:00 +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
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
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
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
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
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
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
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
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
Benedikt Meurer
c516d4f094 [turbofan] Add checked load/store operators.
TEST=mjsunit,cctest,unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/763963002

Cr-Commit-Position: refs/heads/master@{#25591}
2014-12-02 04:49:11 +00:00
rodolph.perfetta
55614cfe69 [turbofan] Recognize rotate right.
Extended the rotate left detection code.

BUG=

Review URL: https://codereview.chromium.org/760523004

Cr-Commit-Position: refs/heads/master@{#25517}
2014-11-26 11:49:43 +00:00
Benedikt Meurer
94f5b78b96 [turbofan] Combine Word32And with Int32Add and negative power of two.
TEST=unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/749233002

Cr-Commit-Position: refs/heads/master@{#25479}
2014-11-24 12:30:30 +00:00
Rodolph Perfetta
481772acdd [turbofan] remove redundant '& 0x1F' for shifts.
JavaScript shifts perform an implicit '& 0x1F' on their right operand, this
patch removes it when the underlying architecture already does it.

BUG=
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/732103002

Cr-Commit-Position: refs/heads/master@{#25438}
2014-11-20 13:09:26 +00:00
Benedikt Meurer
048d37017d [turbofan] Avoid useless sign extension after sign extended load.
TEST=unittests
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/735623002

Cr-Commit-Position: refs/heads/master@{#25388}
2014-11-18 09:28:11 +00:00
titzer@chromium.org
b9886ae9ff Fix bugs in simplified lowering relating to int32/uint32 signs.
Lowering of NumberToUint32 and NumberToInt32 was not correctly accounting for the sign of the input and the sign of the output, emitting the wrong representation changes.

Along the way, I've found cases where MachineOperatorBuilder would break if fed a machine type for loads or stores that was not cached, requiring MachineOperatorBuilder to take zone to allocate operators for these cases.

R=bmeurer@chromium.org, jarin@chromium.org
BUG=

Review URL: https://codereview.chromium.org/714613002

Cr-Commit-Position: refs/heads/master@{#25247}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 14:28:42 +00:00
bmeurer@chromium.org
35cc4af769 [turbofan] Push TruncateFloat64ToInt32 into phis.
TEST=unittests
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/707683003

Cr-Commit-Position: refs/heads/master@{#25189}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:38:47 +00:00
bmeurer@chromium.org
8798c410e1 [turbofan] Turn various diamonds into selects.
TEST=cctest/test-changes-lowering,mjsunit/asm,unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/704463004

Cr-Commit-Position: refs/heads/master@{#25180}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:10:32 +00:00
bmeurer@chromium.org
881cece8de [turbofan] Transform x * -1.0 to -0.0 - x.
TEST=msjunit/asm,unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/683753004

Cr-Commit-Position: refs/heads/master@{#25176}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 06:13:46 +00:00
bmeurer@chromium.org
18e18d21f1 [turbofan] Strip useless sign-extension for store8/store16.
TEST=unittests
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/698963002

Cr-Commit-Position: refs/heads/master@{#25091}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 07:35:49 +00:00
bmeurer@chromium.org
498920f91c [turbofan] Also optimize unsigned division by constant.
TEST=cctest,mjsunit,unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/697663003

Cr-Commit-Position: refs/heads/master@{#25061}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 10:05:46 +00:00
titzer@chromium.org
bd5c9834b6 Fix bug in optimization of Uint32LessThan.
R=jarin@chromium.org
BUG=

Review URL: https://codereview.chromium.org/689883003

Cr-Commit-Position: refs/heads/master@{#25023}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 15:52:47 +00:00
bmeurer@chromium.org
3a089bf9a0 [turbofan] Reduce (x & K) & K to x & K.
TEST=unittests
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/685713002

Cr-Commit-Position: refs/heads/master@{#24931}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 11:57:44 +00:00
bmeurer@chromium.org
f535763763 [turbofan] Implement the correct semantics for integer division/modulus.
Also fix the sdiv/udiv instructions on ARM as a nice side effect.

TEST=cctest,unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/677483005

Cr-Commit-Position: refs/heads/master@{#24888}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-26 12:50:46 +00:00
bmeurer@chromium.org
1efc572fe7 [turbofan] Reduce ~~x to x.
TEST=unittests
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/666723005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:24:01 +00:00
bmeurer@chromium.org
cc60a45d78 [turbofan] Move node matchers to separate file.
TEST=unittests
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/639293006

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:26:23 +00:00
rossberg@chromium.org
0e16150d33 Better typing and type verification
- Extend verifier to check types of JS and Simplified nodes.
- Untyped nodes now contain NULL as types, enforcing hard failure.
- Typer immediately installs itself as a decorator; remove explicit decorator installation.
- Decorator eagerly types all nodes that have typed inputs
  (subsumes typing of constant cache, removing its typing
  side-channel and various spurious dependencies on the typer).
- Cut down typer interface to prevent inconsistently typed graphs.
- Remove verification from start, since it caused too much trouble
  with semi-wellformed nodes.
- Fix a couple of bugs on the way that got uncovered.

To do: verifying machine operators. Also, various conditions in the
verifier are currently commented out, because they don't yet hold.

BUG=
R=jarin@chromium.org,titzer@chromium.org

Review URL: https://codereview.chromium.org/658543002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 11:38:04 +00:00
bmeurer@chromium.org
81877a6440 [turbofan] Optimize division/modulus by constant.
TEST=cctest,mjsunit,unittests
R=dcarney@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/654833002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 11:57:06 +00:00
bmeurer@chromium.org
5c1f7b5aa1 [turbofan] Optimize Int32Mod by power-of-two.
TEST=mjsunit/asm/int32-tmod,unittests
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/649083005

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 11:09:32 +00:00