mstarzinger@chromium.org
d02f7210ef
Make floating merges respected minimum RPO of coupled phis.
...
R=bmeurer@chromium.org , jarin@chromium.org
TEST=cctest/test-scheduler/LoopedFloatingDiamond
Review URL: https://codereview.chromium.org/682983003
Cr-Commit-Position: refs/heads/master@{#24930}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 11:38:48 +00:00
bmeurer@chromium.org
95095af57f
[turbofan] Improve typed lowering for JSToBoolean.
...
- JSToBoolean(x:string) => BooleanNot(NumberEqual(x.length, #0 ))
- JSToBoolean(phi(x1,...,xn):primitive) => phi(JSToBoolean(x1),...,JSToBoolean(xn))
TEST=cctest,mjsunit/asm/do-while,mjsunit/boolean,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/681223002
Cr-Commit-Position: refs/heads/master@{#24919}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 08:34:15 +00:00
jarin@chromium.org
167fa99716
Revert "[turbofan] Merge GenericNode with Node."
...
This reverts commit a238443c00
(r24915)
for tanking benchmarks.
TBR=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/684693002
Cr-Commit-Position: refs/heads/master@{#24916}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 22:34:44 +00:00
jarin@chromium.org
a238443c00
[turbofan] Merge GenericNode with Node.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/676353002
Cr-Commit-Position: refs/heads/master@{#24915}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 20:37:47 +00:00
wingo@igalia.com
0755160e28
Revert "Move AST node counting to post-pass"
...
This reverts commit 698356720824559a6bd81c24be707b44ac277526 for
breaking regress-96526-002 among other things.
TBR=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/678033002
Cr-Commit-Position: refs/heads/master@{#24910}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 16:25:40 +00:00
wingo@igalia.com
88e0c38c9a
Move AST node counting to post-pass
...
R=mstarzinger@chromium.org , svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/675493002
Cr-Commit-Position: refs/heads/master@{#24909}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 15:00:43 +00:00
dcarney@chromium.org
91f4962343
[turbofan] reduce allocations outside of pipeline
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/679793003
Cr-Commit-Position: refs/heads/master@{#24904}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 12:40:13 +00:00
danno@chromium.org
16928e28d7
[turbofan] Reduce memory consumption of graph building
...
Allow reservation of additional input capacity when creating nodes to prevent switching to deque representation when adding well-known additional inputs.
Also ensure that only a single temporary buffer is used to create temporary input arrays before allocating nodes.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/644083003
Cr-Commit-Position: refs/heads/master@{#24896}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 10:12:40 +00:00
titzer@chromium.org
82581534ae
Implement control reducer, which reduces branches and phis together in a single fixpoint.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/665223006
Cr-Commit-Position: refs/heads/master@{#24891}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 08:42:16 +00:00
titzer@chromium.org
21013d2641
Fix bugs in Scheduler hoisting and RPO loop bounds computations.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/677683002
Cr-Commit-Position: refs/heads/master@{#24877}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:57:39 +00:00
mstarzinger@chromium.org
a9a7979e9e
Add Schedule::InsertBranch to fuse control flow graphs.
...
R=jarin@chromium.org
TEST=cctest/test-schedule/TestScheduleInsertBranch
Review URL: https://codereview.chromium.org/675983002
Cr-Commit-Position: refs/heads/master@{#24876}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:48:18 +00:00
jarin@chromium.org
c7685a59f0
[turbofan] Use range types to type and lower arithmetic ops.
...
This is based on Georg's work on typing arithmetic operations (https://codereview.chromium.org/658743002/ ).
Instead of weakening to bitset types, we weaken to the closest 2^n
limit if we see that we are re-typing a node with a range type (which
means that the node can be part of a cycle, so we might need
to speed up the fixpoint there).
BUG=
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/636283009
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 14:40:43 +00:00
bmeurer@chromium.org
80836787a3
[turbofan] Improve code generation for inline comparisons with zero.
...
TEST=cctest,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/669133004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 10:22:06 +00:00
titzer@chromium.org
5a1774268a
Add Terminate operator.
...
Terminate is need for non-terminating loops (NTLs) that can appear after optimizing control flow. It gathers the control and effect(s) from a NTL and connects them to end so that they are not dead-code removed.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/651843004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 17:15:38 +00:00
bmeurer@chromium.org
6619a7975d
[turbofan] Add support for deferred code.
...
Branch can now have an optional hint, when the condition is
likely true or false, and if such a hint is present the other
basic block will be marked as deferred and placed at the end
of the function.
We currently use this feature for tagging int32/uint32 in
change lowering, and for load/store bounds checks in simplified
lowering.
TEST=cctest,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/642883003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 11:24:55 +00:00
dcarney@chromium.org
1c5fafe890
[turbofan] use ZonePool in most places in the compiler pipeline a temp zone is used.
...
R=jarin@chromium.org , bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/663333003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 14:44:50 +00:00
dcarney@chromium.org
54fef44df3
[turbofan] add ZonePool to correctly track compiler phase memory usage
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/665893006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:38:46 +00:00
wingo@igalia.com
4eddbacabf
Assign bailout and type feedback IDs in a post-pass
...
This will allow us to move expressions from one function to another, for
example when the parser determines that a given cover grammar instance
is actually the default value initializer for an arrow function.
This is a re-land of https://codereview.chromium.org/636403003/ with a
fix for the arm64 code generator.
R=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/663373003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:16:37 +00:00
svenpanne@chromium.org
d66d302b00
Revert "Assign bailout and type feedback IDs in a post-pass"
...
This reverts r24757, which breaks the ARM64 simulator build.
Simple repro:
out/arm64.debug/d8 -e 'eval("(function(){ const x; var x; })")'
TBR=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/652543006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 10:55:12 +00:00
svenpanne@chromium.org
2b8d734037
Assign bailout and type feedback IDs in a post-pass
...
This will allow us to move expressions from one function to another, for
example when the parser determines that a given cover grammar instance
is actually the default value initializer for an arrow function.
R=svenpanne@chromium.org , marja@chromium.org
BUG=
Review URL: https://codereview.chromium.org/636403003
Patch from Andy Wingo <wingo@igalia.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:52:32 +00:00
dcarney@chromium.org
6c1e4f08d1
[turbofan] cleanup InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/664123002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 06:59:50 +00:00
dcarney@chromium.org
32161089da
[turbofan] pass zone to InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/663073002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:18:07 +00:00
dcarney@chromium.org
4e191e782e
[turbofan] remove schedule from InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/669613002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 10:19:15 +00:00
sigurds@chromium.org
bc475b4a6b
Add inlining for intrinsics.
...
This issue is for discussion on how to proceed.
I think the implementation of ValueOf shows that directly creating the IR does not scale.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/612043003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 07:56:50 +00:00
titzer@chromium.org
e4c6f9488e
Implement graph trimming in ControlReducer.
...
Trimming the graph consists of breaking links from nodes that are not reachable from end to nodes that are reachable from end. Such dead nodes show up in the use lists of the live nodes and though mostly harmless, just clutter up the graph. They also can limit instruction selection opportunities, so it is good to get rid of them.
This CL is one half of the ControlReducer functionality, the other half
being branch folding.
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/661923002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 11:51:57 +00:00
neis@chromium.org
7f7354f3fd
Test monotonicity of expression typings.
...
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/653093002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 11:46:06 +00:00
bmeurer@chromium.org
fe3a8845f0
[turbofan] Correctify typed lowering.
...
We cannot add new JSToNumber nodes here in general, because:
a) The inserted ToNumber operation screws up observability of valueOf.
b) Deoptimization at ToNumber doesn't have corresponding bailout id.
TEST=cctest,mjsunit
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/649543004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-16 11:31:00 +00:00
titzer@chromium.org
ad80a80a8b
Fix bug in NodeCache::GetCachedNodes
...
TBR=dcarney@chromium.org
BUG=
Review URL: https://codereview.chromium.org/656033003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 13:07:18 +00:00
titzer@chromium.org
754abff699
Add JSGraph::GetCachedNodes and NodeCache::GetCachedNodes. These routines are necessary in the dead code elimination phase to trim away uses from unreachable nodes.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/656103002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 12:29:39 +00:00
dcarney@chromium.org
37f1645023
[turbofan] more verification of rpo
...
R=titzer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/603533002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 12:15:38 +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
neis@chromium.org
93d0e79d6e
Again reland "Refine expression typing, esp. by propagating range information."
...
This relands commit 24552.
TBR=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/650513003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 08:21:46 +00:00
bmeurer@chromium.org
f574d93e51
Revert "Reland "Refine expression typing, esp. by propagating range information.""
...
This reverts commit r24609 for breaking the
cctest/test-js-typed-lowering/Int32BitwiseBinops test.
TBR=rossberg@chromium.org ,neis@chromium.org
Review URL: https://codereview.chromium.org/656003002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 03:50:13 +00:00
neis@chromium.org
a7eb593147
Reland "Refine expression typing, esp. by propagating range information."
...
This relands commit 24552.
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/653693002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 16:27:26 +00:00
sigurds@chromium.org
4dc4b40925
Reland "Fix scheduler to correctly schedule nested diamonds".
...
Reland fix: Consume less memory.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/636233006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 12:08:55 +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
dcarney@chromium.org
75d15894f6
[turbofan] remove some of the dependency of Instruction on Schedule
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/646393002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 08:51:22 +00:00
sigurds@chromium.org
aa67d12f09
Revert "Fix scheduler to correctly schedule nested diamonds."
...
This reverts commit 0ab306041a6eba99fe5e2ef78251de137321f559.
"Fix" make scheduler run out of memory.
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/656473002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 16:08:29 +00:00
sigurds@chromium.org
0f5949d605
Fix scheduler to correctly schedule nested diamonds.
...
The scheduler rewires control based on the last *control*
node that appears in the schedule of a block. This is not
sufficient to account for dependencies.
This patch adds additional dependencies to floating control
nodes. Given a floating control node A, every non-control
dependency of every node B that depends on A is introduces
as an additional dependency of A.
This allows the scheduler to correctly schedule two
diamonds A, B, if their only correct schedule is to
schedule B into the ifTrue successor in A.
TEST=cctest/test-scheduler/NestedFloatingDiamonds
R=mstarzinger@chromium.org , titzer@chromium.org
Review URL: https://codereview.chromium.org/602083003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 13:07:49 +00:00
neis@chromium.org
a2f4963abd
Revert "Refine expression typing, esp. by propagating range information."
...
This reverts commit 24552.
TBR=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/648163002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 10:48:01 +00:00
neis@chromium.org
5a0ff8e656
Refine expression typing, esp. by propagating range information.
...
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/618803003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 10:40:29 +00:00
dcarney@chromium.org
657052e87f
[turbofan] remove graph from InstructionSequence
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/652643002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 08:09:27 +00:00
dcarney@chromium.org
907ad65dce
[turbofan]IA: ChangeFloat32ToFloat64 supports mem operand
...
BUG=
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/641153003
Patch from Jing Bao <jing.bao@intel.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 07:42:35 +00:00
dcarney@chromium.org
3396c2badd
[turbofan] IA: TruncateFloat64ToFloat32 supports mem operand
...
BUG=
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/639283003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 07:12:57 +00:00
bmeurer@chromium.org
9b306893a3
[turbofan] Properly emit bounds checks for typed array element loads.
...
Also fix an awfull bug in simplified lowering.
TEST=cctest,mjsunit/asm
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/640603003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 11:16:45 +00:00
titzer@chromium.org
015f963e8f
Lower NumberMultiply, NumberDivide, and NumberModulus to Int32Mul, Int32[U]Div, and Int32[U]Mod when possible in simplified-lowering.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/620553008
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 10:53:46 +00:00
titzer@chromium.org
42365d429c
The empty husk of a JSFunction is useful to us.
...
We hollow out the rotting core and with evil intent repurpose its dry carcass to empower ourselves; with such a shell we can test.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/637873002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 09:23:33 +00:00
jochen@chromium.org
5a6f37c77e
Fix compilation on win64
...
TBR=bmeurer@chromium.org
LOG=n
BUG=none
Review URL: https://codereview.chromium.org/613093004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 16:00:44 +00:00
bmeurer@chromium.org
a17289f4bc
[turbofan] Drop broken StaticParameterTraits.
...
The StaticParameterTraits are broken by design, and cause way too much
trouble. The compilers usually pick the wrong specialization (i.e. the
default specialization is picked for Load and Phi even tho there is a
specialization for MachineType), which is not only the reason why GVN is
ineffective and slow, but can also lead to correctness issues in some
rare cases.
Also clean up some minor bugs/inconsistencies on the way.
TEST=cctest,unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/636893002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 13:30:28 +00:00
titzer@chromium.org
fabb14e87f
Fix bugs in lowering NumberToInt32.
...
The backward propagation was different in the lowering phase versus the propagation phase, leading to some missing truncations.
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/638533002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 12:18:39 +00:00
titzer@chromium.org
f98b7ecd4b
Remove extraneous line from CompareWrapper test
...
On platforms without TurboFan (PowerPC) the CompareWrapper test was
failing. It appears the line
RawMachineAssemblerTester<int32_t> m;
was causing the issue, and does not appear to be required for the
test to operate correctly. Removing it resolves the crash on non
TurboFan platforms
BUG=
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/618043002
Patch from Andrew Low <andrew_low@ca.ibm.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 16:26:25 +00:00
paul.lind@imgtec.com
f9b39f29fb
MIPS: Add turbofan support for mips32.
...
BUG=
R=bmeurer@chromium.org , dusan.milosavljevic@imgtec.com
Review URL: https://codereview.chromium.org/601723002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 15:48:48 +00:00
rodolph.perfetta@arm.com
9d3eda079e
[turbofan] re-enable some tests for arm64.
...
Those tests were disabled because of an issue in TruncateDoubleToI which has
been fixed since.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/605253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 15:47:40 +00:00
mstarzinger@chromium.org
3bc3df9a27
Implement inlined stack-check guards in TurboFan.
...
R=bmeurer@chromium.org
TEST=cctest/test-run-stackcheck/TerminateAtMethodEntry
Review URL: https://codereview.chromium.org/621833003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 14:03:02 +00:00
bmeurer@chromium.org
b9afcdcefb
[turbofan] Add control input to Load and LoadElements.
...
Also remove the now obsolete ControlEffect operator.
TEST=cctest,mjsunit,unittests
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/620803003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 11:08:37 +00:00
dcarney@chromium.org
b3d426889d
[turbofan] intel lea add multiply matchers
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/614013002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 10:47:14 +00:00
titzer@chromium.org
c1d79db81b
Rename Int32{UMod,UDiv} to Uint32{Div,Mod} and Int64{UMod,UDiv} to Uint64{Div,Mod}.
...
R=bmeurer@chromium.org , mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/620773003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 10:39:11 +00:00
bmeurer@chromium.org
67383fe700
[turbofan] Add BoundsCheckMode to ElementAccess.
...
This is currently only used for StoreElement. LoadElement will be
updated to make use of that in a follow-up CL (depends on additional
control input for loads first).
TEST=cctest,mjsunit
R=jarin@chromium.org , mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/617853002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 07:42:54 +00:00
bmeurer@chromium.org
900df59f41
Correct fix this time.
...
TBR=dcarney@chromium.org
Review URL: https://codereview.chromium.org/619613003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:56:25 +00:00
bmeurer@chromium.org
d721ea6b9d
Fix windows build after r24322.
...
TBR=dcarney@chromium.org
Review URL: https://codereview.chromium.org/617803002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:55:02 +00:00
bmeurer@chromium.org
c1ee6247ca
[turbofan] Some javascript operators are globally shared singletons.
...
Also cleanup the interface, and make the parameter class/accessors
explicit to work-around the type-unsafety of OpParameter<T>.
TEST=compiler-unittests,cctest,mjsunit
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/613683002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:42:44 +00:00
bmeurer@chromium.org
3eebdc3264
Replace OStream with std::ostream.
...
Review URL: https://codereview.chromium.org/618643002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:29:32 +00:00
dcarney@chromium.org
49ffb141d9
[turbofan] IA: Uint32ToFloat64 supports mem operand.
...
BUG=
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/583963002
Patch from Jing Bao <jing.bao@intel.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:24:11 +00:00
jarin@chromium.org
6a07181cde
Refactor BasicBlock to not use GenericNode.
...
To manage BasicBlock's predecessors and successors we now use plain
std::vector.
The change also moves bunch of method definitions from header files
to implementation files.
In zlib, the change brings 3x improvement in the scheduler's memory
consumption. The --turbo-stats flag says we go 169MB -> 55MB in
the scheduler, 383MB -> 268MB overall.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/606403003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 08:23:20 +00:00
jarin@chromium.org
5b742b356d
Adding more missing deoptimization points in Turbofan.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/595863002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 13:37:58 +00:00
mstarzinger@chromium.org
b2aaac9404
Drop deprecated method for backing store from AccessBuilder.
...
R=bmeurer@chromium.org
TEST=cctest/test-simplified-lowering/RunLoadStoreArrayBuffer
Review URL: https://codereview.chromium.org/614703002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 11:35:01 +00:00
dcarney@chromium.org
058f24d0ce
add missing inl includes
...
TBR=marja@chromium.org
BUG=
Review URL: https://codereview.chromium.org/612813002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 10:34:21 +00:00
Jacob.Bramley@arm.com
89ee8ec1b1
[turbofan] add some simplifications in the machine operator reducer
...
Simplify the '+', '-' and '%' operators with some basic constants (0, 1 or NaN).
R=titzer@chromium.org , bmeurer@chromium.org , titzer@google.com
BUG=
Review URL: https://codereview.chromium.org/599383002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 08:30:17 +00:00
dcarney@chromium.org
0ae4c7d6b6
build fix - add missing inl include
...
TBR=marja@chromium.org
BUG=
Review URL: https://codereview.chromium.org/608203002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 07:48:05 +00:00
dcarney@chromium.org
5d0e9a2496
[turbofan] basic block profiler
...
R=titzer@chromium.org , mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/593563005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 07:29:14 +00:00
bmeurer@chromium.org
8ff496edfb
[turbofan] Drop obsolete test after r24236.
...
This was missing from the previous commit.
TBR=jarin@chromium.org
Review URL: https://codereview.chromium.org/602193005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-26 06:52:23 +00:00
bmeurer@chromium.org
432b1768e1
[turbofan] Add backend support for Float32Constant.
...
TEST=cctest,compiler-unittests,mjsunit
BUG=v8:3589
LOG=n
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/600383002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-25 08:56:02 +00:00
bmeurer@chromium.org
17a01814d6
Fix windows build after r24191.
...
TBR=titzer@chromium.org
Review URL: https://codereview.chromium.org/604693002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-25 05:17:38 +00:00
titzer@chromium.org
219cae86b9
Add tests for representation change of constants.
...
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/602713002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 16:04:05 +00:00
titzer@chromium.org
9fb5f564a9
Add support for Float32 representation changes.
...
R=bmeurer@chromium.org
BUG=v8:3589
LOG=n
Review URL: https://codereview.chromium.org/598963002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 11:55:07 +00:00
bmeurer@chromium.org
50c466e883
[turbofan] Add backend support for float32.
...
LOG=n
BUG=v8:3589
TEST=compiler-unittests,cctest
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/596703004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 11:08:35 +00:00
bmeurer@chromium.org
aeae854827
Fix windows build.
...
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/598943002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 09:32:28 +00:00
bmeurer@chromium.org
deaf463bf1
[turbofan] Add length operand to LoadElement and StoreElement.
...
This is preliminary work, required to properly support bounds checking for typed array loads/stores.
TEST=compiler-unittests,cctest
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/602563002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-24 09:28:56 +00:00
mstarzinger@chromium.org
e4da4dbf23
Move test for reduction of Math.max to unittest.
...
R=bmeurer@chromium.org
TEST=compiler-unittests/JSBuiltinReducerTest.MathMax
Review URL: https://codereview.chromium.org/598523002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-23 11:40:00 +00:00
mstarzinger@chromium.org
5304f5e719
Move test for reduction of Math.imul to unittest.
...
R=bmeurer@chromium.org
TEST=compiler-unittests/JSBuiltinReducerTest.MathImul
Review URL: https://codereview.chromium.org/591373003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-23 11:26:49 +00:00
mstarzinger@chromium.org
0a4e98ba43
Extend JSBuiltinReducer to cover Math.max as well.
...
R=svenpanne@chromium.org
TEST=cctest/test-js-typed-lowering/BuiltinMathMax
Review URL: https://codereview.chromium.org/590993003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-23 08:16:54 +00:00
dcarney@chromium.org
1adad89746
[turbofan] don't call out to c
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/587273002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-22 13:56:03 +00:00
mstarzinger@chromium.org
7765a5fd88
Add JSBuiltinReducer for inlining well-known builtins.
...
R=titzer@chromium.org
TEST=cctest/test-js-typed-lowering/BuiltinMathImul
Review URL: https://codereview.chromium.org/584573003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 15:02:58 +00:00
titzer@chromium.org
2af8a21b93
Fix build.
...
TBR=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/591453002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 14:40:08 +00:00
titzer@chromium.org
8892385565
[turbofan] IA: Float64ToUint32 supports mem operand
...
BUG=
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/582713002
Patch from Weiliang Lin <weiliang.lin@intel.com>.
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 14:25:13 +00:00
titzer@chromium.org
9253510f5e
Fix windows warning.
...
TBR=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/583123003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 10:52:19 +00:00
titzer@chromium.org
b35db9c63b
Fix float truncations in typed array tests.
...
TBR=svenpanne@chromium.org
BUG=
Review URL: https://codereview.chromium.org/577163003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 10:45:04 +00:00
titzer@chromium.org
43627e7ea8
Hack representation inference to assume current behavior of float32 loads and stores, which include implicit representation changes.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/576973003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 09:56:12 +00:00
mstarzinger@chromium.org
4413d318a6
Unify use-sites of EnsureDeoptimizationSupport.
...
R=sigurds@chromium.org
Review URL: https://codereview.chromium.org/563123004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 09:02:36 +00:00
sigurds@chromium.org
68075b0a05
Reland "Add handling for argument adaptor frames to inlining."
...
Original: https://codereview.chromium.org/573703002/
Reland Fixes:
- Add deopt framestate to CollectStackTrace runtime call
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/544953006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 08:56:52 +00:00
sigurds@chromium.org
b8dd74779c
Revert "Add handling for argument adaptor frames to inlining."
...
This reverts commit r24008.
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/581673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 15:00:57 +00:00
mstarzinger@chromium.org
79e095c8d0
Introduce simplified BooleanToNumber operator.
...
R=titzer@chromium.org
TEST=cctest/test-simplified-lowering/LowerBooleanToNumber
Review URL: https://codereview.chromium.org/579723004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 14:47:25 +00:00
sigurds@chromium.org
887b77aa83
Add handling for argument adaptor frames to inlining.
...
- Lazy deopt from inlined calls
- Lazy deopt from inlined calls with parameter mismatch
R=jarin@chromium.org , mstarzinger@chromium.org , mstarzinger@chromium
Review URL: https://codereview.chromium.org/573703002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-17 14:41:30 +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
mstarzinger@chromium.org
2c04afb9ce
Avoid usage of temporary MachineOperatorBuilder.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/562203004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 16:20:10 +00:00
mstarzinger@chromium.org
d20bd6dac1
Adapt some typed lowering unit tests after r23972.
...
R=rossberg@chromium.org
TEST=cctest/test-js-typed-lowering
Review URL: https://codereview.chromium.org/574713002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 12:17:40 +00:00
mstarzinger@chromium.org
d313551a3e
Disable lowering to StringAdd due to various issues.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/566303003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 08:29:46 +00:00
jarin@chromium.org
00e90b7e6e
Remove deoptimization by patching the call stack.
...
We go back to patching the code for lazy deoptimization because ICs need the on-stack return address to read/update the IC address/state.
The change also fixes bunch of tests, mostly by adding more deoptimization points.
(We still need to add code to ensure lazy deopt patching does not overwrite ICs and other lazy deopts; this is coming next.)
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/568783002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-15 09:21:39 +00:00
bmeurer@chromium.org
578aeb0b0c
[turbofan] Some common operators are globally shared singletons.
...
TEST=compiler-unittests,cctest
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/565753004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 11:59:26 +00:00
sigurds@chromium.org
4ec63ff97e
Reland
...
- "Switch inlining to use simplified instead of machine loads."
- "Add copy support in inliner."
Reland fixes:
- size_t conversion for 64bit arches
- Don't call front() on empty vector
(triggers assertion on windows)
- turbo_inlining now implies turbo_types, as
it requires simplified lowering.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/559843004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 11:06:37 +00:00
mstarzinger@chromium.org
b930ef1012
Fix typed lowering of JSAdd on non-number inputs.
...
R=rossberg@chromium.org
TEST=mjsunit/regress/regress-3476
Review URL: https://codereview.chromium.org/564823003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 16:09:21 +00:00
mstarzinger@chromium.org
4bee89e03c
Fix typed lowering of ToBoolean on NaN input.
...
R=rossberg@chromium.org
TEST=webkit/convert-nan-to-bool
Review URL: https://codereview.chromium.org/565493003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 12:38:16 +00:00
bmeurer@chromium.org
bfa3884ae0
[turbofan] Machine operators are globally shared singletons.
...
TEST=compiler-unittests,cctest
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/547233003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 10:37:49 +00:00
bmeurer@chromium.org
cf293f7780
[turbofan] Lower JSStoreProperty during JS typed lowering.
...
Note that we cannot yet emit a diamond here (patch is ready), because
the scheduler is still broken wrt. free floating control (seems related
although this diamond is not free floating).
TEST=cctest
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/557123005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 12:29:48 +00:00
bmeurer@chromium.org
6bb08db27e
[turbofan] Next step towards shared operators.
...
TEST=compiler-unittests,cctest
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/555283004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 12:23:45 +00:00
mstarzinger@chromium.org
de0b213cf2
Switch inlining to use simplified instead of machine loads.
...
R=sigurds@chromium.org
TBR=bmeurer@chromium.org
TEST=cctest/test-run-inlining --turbo-types
Review URL: https://codereview.chromium.org/557253004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 09:48:03 +00:00
bmeurer@chromium.org
4f5b0911db
Revert "Switch inlining to use simplified instead of machine loads.", "Fix size_t to int conversion compile error." and "Add copy support in inliner.".
...
This reverts commits r23813, r23805 and r23804 for Windows breakage.
TBR=mstarzinger@chromium.org ,sigurds@chromium.org
Review URL: https://codereview.chromium.org/562543002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 06:39:25 +00:00
mstarzinger@chromium.org
947726a79c
Switch inlining to use simplified instead of machine loads.
...
R=sigurds@chromium.org
TEST=cctest/test-run-inlining --turbo-types
Review URL: https://codereview.chromium.org/551413002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-09 15:55:47 +00:00
bmeurer@chromium.org
bbd96b97e4
[turbofan] Add support for overflow add/sub to the MachineOperatorReducer.
...
TEST=base-unittests,compiler-unittests,cctest
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/555833002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-09 14:18:17 +00:00
sigurds@chromium.org
1f9215ba8d
Add copy support in inliner.
...
Refactors JSGraph to ensure that the zone operators are created in
can be different from the Graph's zone.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/553873002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-09 13:20:09 +00:00
bmeurer@chromium.org
2bbeb652ee
[turbofan] Fix the node matchers.
...
E.g. make sure that Int32Matcher matches only int32 constants, and
Float64Matcher matches only float64 constants.
Also remove the confusing CommonOperatorTraits, which are too easy
to use in a wrong way.
TEST=compiler-unittests,cctest
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/552653003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-08 09:16:11 +00:00
titzer@chromium.org
09dccec9f4
Platform-dependent turbofan tests.
...
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/541343003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 13:22:27 +00:00
bmeurer@chromium.org
99ccab81e2
[turbofan] Add MachineType to Phi.
...
TEST=cctest,compiler-unittests,mjsunit
R=mstarzinger@chromium.org , titzer@chromium.org
Review URL: https://codereview.chromium.org/545153002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 11:44:31 +00:00
bmeurer@chromium.org
65fa2b49da
[turbofan] Fix cctest/test-graph-reducer/ReduceForward1.
...
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/542063003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 11:20:55 +00:00
bmeurer@chromium.org
5042b23b86
[turbofan] Get rid of the StructuredMacroAssembler.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/544053002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 08:48:41 +00:00
mstarzinger@chromium.org
bb025c1ceb
Remove overly complex MachineNodeFactory.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/543763002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 16:29:40 +00:00
jarin@chromium.org
b3b4e3eea5
Fix deoptimization of context.
...
We need to handle the case where the context was removed by dead code
elimination. In that case, we just use the context from the activation
(or from the inlined function if we are inlined).
For reference, here is the CL that introduced the bug: https://codereview.chromium.org/522873002
BUG=410566
LOG=N
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/542613002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 14:52:52 +00:00
mstarzinger@chromium.org
4539e9b936
Remove deprecated PrintableUnique.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/543743002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 13:45:05 +00:00
mstarzinger@chromium.org
51894ec36c
Move StructuredMachineAssembler into cctest suite.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/539903002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 10:23:51 +00:00
bmeurer@chromium.org
c8ffed8879
[turbofan] Make sure Operator is really immutable.
...
Make Operator const-correct in preparation for allocating sharing
Operators across different isolates (using LazyInstance).
TEST=cctest,compiler-unittests,mjsunit
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/539933002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 09:37:25 +00:00
bmeurer@chromium.org
b1eca2cea7
[turbofan] Properly delete nodes in the GraphReducer.
...
This is required to enable a value numbering reducer, which needs to be
able to recognize "dead nodes".
TEST=compiler-unittests,cctest
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/541643002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 09:22:10 +00:00
sigurds@chromium.org
f7d5558a7a
Reland "Make FrameStates recursive (to be used for inlining).".
...
Reland fixes:
- Verifier is now aware of sentinel value for FrameState chains.
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/534573002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 14:10:20 +00:00
mstarzinger@chromium.org
01b9f4e2d3
Lower simplified StringLessThan[OrEqual] to runtime call.
...
R=titzer@chromium.org
TEST=cctest/test-simplified-lowering/LowerStringOps_to_call_and_compare
Review URL: https://codereview.chromium.org/531093002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 12:43:41 +00:00
mstarzinger@chromium.org
3071a64f5f
Fix typed lowering of JSToBoolean on number inputs.
...
R=titzer@chromium.org
TEST=cctest/test-js-typed-lowering/JSToBoolean_replacement
Review URL: https://codereview.chromium.org/533103002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 11:35:19 +00:00
titzer@chromium.org
e1a948a6f8
Convert Linkage to use MachineSignature.
...
This simplifies the handling of MachineTypes for parameters and returns
used in tests, and overall improves the regularity with which they
are handled in both tests and in CallDescriptor.
R=bmeurer@chromium.org , jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/530783002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 10:13:21 +00:00
mstarzinger@chromium.org
baf818b152
Lower simplified StringEqual to runtime call.
...
R=titzer@chromium.org
TEST=cctest/test-simplified-lowering/LowerStringOps_to_call_and_wordeq
Review URL: https://codereview.chromium.org/531763002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 13:26:52 +00:00
mstarzinger@chromium.org
9248f4d7d4
Lower simplified StringAdd to stub call.
...
R=titzer@chromium.org
TEST=cctest/test-simplified-lowering/LowerStringOps_to_calls
Review URL: https://codereview.chromium.org/530973002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 12:46:37 +00:00
bmeurer@chromium.org
db10bef4de
[turbofan] First step of Operator refactoring.
...
- Real const-correctness
- Proper forward declarations instead of #include "src/v8.h"
- Flags for Operator properties.
- etc.
TEST=compiler-unittests,cctest
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/526313002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 11:36:55 +00:00
jarin@chromium.org
a520e03442
Revert "Make FrameStates recursive (to be used for inlining)."
...
This reverts commit r23595.
TBR=sigurds@chromium.org
BUG=
Review URL: https://codereview.chromium.org/528963002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 11:28:40 +00:00
sigurds@chromium.org
7117cae25e
Make FrameStates recursive (to be used for inlining).
...
- Changes FrameState node to require a 5th input
(use undefined as sentinel).
- Adds outer_state pointer to FrameStateDescriptor.
- Instruction selection dumps dependencies of FrameState chain into the instruction.
- Code generator builds the translation for rec. FrameStates.
(will require further integration tests)
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/517323002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 10:49:27 +00:00
bmeurer@chromium.org
30f18f0f7d
Use Chrome compatible naming for compiler specifics.
...
Less useless creativity is best creativity!
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/526223002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 07:07:52 +00:00
bmeurer@chromium.org
7300a2a343
[turbofan] Fix MachineOperatorReducer to use JSGraph as well.
...
TEST=compiler-unittests,cctest
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/526083002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 05:08:54 +00:00
mstarzinger@chromium.org
bf3d436b57
Fix typed lowering of JSUnaryNot to work with graph reducer.
...
R=titzer@chromium.org
TEST=cctest/test-js-typed-lowering/UnaryNot[Effects]
Review URL: https://codereview.chromium.org/523633002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 12:17:43 +00:00
jarin@chromium.org
a668cd6fc8
Context deoptimization and removal of the deoptimization block in Turbofan
...
This adds context deoptimization to Turbofan and Crankshaft (also submitted separately as https://codereview.chromium.org/515723004/ ).
The second patchset removes the deoptimization/continuation block from calls.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/522873002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 09:31:14 +00:00
mstarzinger@chromium.org
e019dc7414
Fix Node::ReplaceUses to handle unused nodes.
...
R=bmeurer@chromium.org
TEST=cctest/test-node/NodeUseIteratorReplaceNoUses
Review URL: https://codereview.chromium.org/521643002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 12:14:52 +00:00
rodolph.perfetta@arm.com
fb7e3c8f95
ARM64: re-enable turbofan tests.
...
The tests were already passing.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/513253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 09:49:50 +00:00
sigurds@chromium.org
9091e87d8f
Add more inlining unit tests.
...
- Scheduler can inline a function with a loop.
- Inlining strict into non-strict works correctly.
- Inlining non-strict into strict works correctly.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/515103002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 08:58:51 +00:00
bmeurer@chromium.org
804ef93d99
Fix windows build.
...
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/524533002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 05:45:16 +00:00
bmeurer@chromium.org
ffbe019e22
Fix cctest/test-run-properties/TypedArrayLoad.
...
Note: The test failure was unrelated to the fact that it run on actual
ARM hardware, but it was failing because the test relied on undefined
and implementation defined behaviour of the C++ compiler.
TBR=mstarzinger@chromium.org
TEST=cctest
Review URL: https://codereview.chromium.org/517943002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-29 05:37:55 +00:00
mstarzinger@chromium.org
d0ea36cb5b
Move constructors for [Element/Field]Access into AccessBuilder.
...
R=titzer@chromium.org
TEST=cctest/test-simplified-lowering
Review URL: https://codereview.chromium.org/516943002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 17:53:24 +00:00
mstarzinger@chromium.org
7c6759e982
Fix test failures after r23492.
...
R=vogelheim@chromium.org
TEST=cctest/test-run-properties/TypedArrayLoad
Review URL: https://codereview.chromium.org/517673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 17:28:57 +00:00
mstarzinger@chromium.org
cc8cec354c
Preliminary lowering of typed array loads in TF.
...
R=titzer@chromium.org
TEST=cctest/test-run-properties/TypedArrayLoad
Review URL: https://codereview.chromium.org/516853002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 14:35:11 +00:00
titzer@chromium.org
d6831dbd4b
Use TruncateFloat64ToInt32 instead of ChangeFloat64ToInt32 in lowering of simplified operators NumberToInt32/NumberToUint32.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/509653003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 13:31:55 +00:00
titzer@chromium.org
496697df4e
Add MachineSignature, which is an encapsulation of the machine types for parameters and return values in a graph.
...
This utility will be used to simplify Linkage and fix representation inference
to work with graphs where parameters and return values are something other
than tagged. It will also make testing representation inference a lot
easier, since we can then exactly nail down the machine types of parameters
and returns.
This CL also adds c-signature.h, which demonstrates how to convert C function
signatures into MachineSignatures. The CSignatures will be used in tests to
make it easier and simpler to codegen tests.
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/515173002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 13:17:38 +00:00
sigurds@chromium.org
7bdba61b02
Simplify inlining now that the scheduler is smart(er).
...
* Only control adjustment is to move everything from the inlinee's
start block to the block the call was in.
* Add a unit test to ensure that the scheduler actually picks the
right order when placing the code.
R=mstarzinger@chromium.org , titzer@chromium.org
Review URL: https://codereview.chromium.org/508953002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 12:18:25 +00:00
sigurds@chromium.org
6afb739efe
Fix build.
...
GCC needs definitions for constant members (clang doesn't).
TBR=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/511133002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 08:47:11 +00:00
sigurds@chromium.org
e7817a9e54
Remove dependency from generic lowering on compilation info for determining strictness and builtins.
...
This makes the graphs compositional for inlining (i.e. we can now inline a strict function into a non-strict function, or vice versa).
1) Store strict mode as parameter in StoreNamed/StoreProperty.
R=mstarzinger@chromium.org , titzer@chromium.org
Review URL: https://codereview.chromium.org/473263004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 08:39:24 +00:00
titzer@chromium.org
f875dd66c6
Disable running some change tests on unsupported backends.
...
TBR=vogelheim@chromium.org
BUG=
Review URL: https://codereview.chromium.org/515583002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 16:17:16 +00:00
jarin@chromium.org
8eb5c1524d
Unit test of instruction selection for calls with deoptimization.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/505133002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 15:56:11 +00:00
titzer@chromium.org
fa34ea60c4
Disable some changes tests on ARM64. Also, fix the changes lowering to not use the more expensive TruncateFloat64ToInt32, but to use ChangeFloat64ToInt32/ChangeFloat64ToUint32, as it was before.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/512753002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 13:49:30 +00:00
titzer@chromium.org
5bf4c830dd
Remove old changes lowering code and convert test to use new changes lowering code.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/515433003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-27 11:14:10 +00:00
titzer@chromium.org
6bbf6c5cb0
Schedule floating control.
...
This CL makes several changes to the scheduling algorithm to handle control
flow that is not connected to End. Such control nodes constitute "floating
control islands" that must be linearized by the schedule. This is done
by considering such nodes to be schedulable, and then editing the control
dependencies after a first pass of scheduling. Then a subsequent pass of
scheduling will place all nodes correctly into the fully connected graph.
R=mstarzinger@chromium.org , rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/499363002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 15:25:07 +00:00
mstarzinger@chromium.org
ecca77ce76
Move context specialization flag into CompilationInfo.
...
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/507603003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 15:17:57 +00:00
bmeurer@chromium.org
90c8932596
Replace our homegrown ARRAY_SIZE() with Chrome's arraysize().
...
Our own ARRAY_SIZE() was pretty bad at error checking. If you use
arrasize() in a wrong way, the compiler will issue an error instead of
silently doing the wrong thing. The previous ARRAY_SIZE() macro is still
available as ARRAYSIZE_UNSAFE() similar to Chrome.
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/501323002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 09:19:24 +00:00
bmeurer@chromium.org
3e188ace5c
[turbofan] Add backend support for load/store float32 values.
...
This is the bare minimum required to support typed arrays. Support for
working with float32 values will be added based on this.
TEST=compiler-unittests,cctest
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/500343002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 08:29:12 +00:00
mstarzinger@chromium.org
0bf838456f
Fix continue statements within for-in loops.
...
R=titzer@chromium.org
TEST=cctest/test-run-jsbranches/ForInContinueStatement
BUG=v8:3522
LOG=N
Review URL: https://codereview.chromium.org/502043002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 16:32:35 +00:00
mstarzinger@chromium.org
4cf2cfad0a
Fix borked tests after r23354.
...
TBR=vogelheim@chromium.org
TEST=cctest/test-run-inlining
Review URL: https://codereview.chromium.org/505753002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 13:38:10 +00:00
bmeurer@chromium.org
66dd869980
[turbofan] Add backend support for signed loads.
...
Also rename the arch opcodes to match their native counterparts.
TEST=compiler-unittests,cctest
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/505713002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 10:35:38 +00:00
jarin@chromium.org
d8295050d2
Fix deoptimization address patching in Turbofan to use safepoints.
...
Since the deopt patch address needs to be available during GC to
resolve safepoints, we need to move it to the code object (instead of
the deoptimization input data) - accessing a separate fixed array
is not safe during GC. This CL adds a deoptimization_pc field to
each safepoint. The fields points to the deoptimization block.
The CL also fixes wrong register allocator constraints for
frame states on calls. These should always live on the stack
because registers are not preserved during a call.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/504493002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 07:02:19 +00:00
yangguo@chromium.org
3a1c55590f
Correctly forward-declare inline function headers in generic-node.h
...
R=bmeurer@chromium.org , jarin@chromium.org
Review URL: https://codereview.chromium.org/488363003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 06:57:13 +00:00
sigurds@chromium.org
dd3c097123
Reland "Load global object and builtins from activation."
...
Reland fixes:
Don't set string flags (doing so leaks memory).
Load closure from activation for building literals.
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/484273003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 12:40:10 +00:00
sigurds@chromium.org
566cdc3bcd
Reland "Add initial support for inlining."
...
Reland Fixes:
* Remove usage of C++11 vector members.
* Guard tests by V8_TURBO_TARGET.
Changes:
* Make context specialization clean up after itself.
* Add UpdateToAndIncrement to Inputs::iterator.
Uses:iterator already provides this member function.
* Allow next node id in graph to be set.
R=titzer@chromium.org , mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/484083003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 13:05:03 +00:00
bmeurer@chromium.org
37058c1413
[turbofan] Add TruncateFloat64ToInt32 machine operator.
...
Fix ChangeLowering to use TruncateFloat64ToInt32.
TEST=cctest,compiler-unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/484103002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 04:01:00 +00:00
sigurds@chromium.org
ae41c7e4a5
Revert "Load global object and builtins from activation."
...
This reverts commit r23205.
Setting string-type flags in unit tests is not a good idea.
TBR=titzer@chromium.org
Review URL: https://codereview.chromium.org/489543002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 16:07:15 +00:00
sigurds@chromium.org
e07c82baf2
Load global object and builtins from activation.
...
BUG=
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/474633003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 15:16:23 +00:00
sigurds@chromium.org
b488b2ed29
Revert "Add initial support for inlining."
...
This reverts commit r23197.
TBR=titzer@chromium.org
Review URL: https://codereview.chromium.org/481413002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:48:44 +00:00
sigurds@chromium.org
4b943f35cf
Add initial support for inlining.
...
* Add stack depth checking to function tester.
* Make context specialization clean up after itself.
* Add UpdateToAndIncrement to Inputs::iterator.
Uses:iterator already provides this member function.
* Allow next node id in graph to be set.
R=mstarzinger@chromium.org , titzer@chromium.org
Review URL: https://codereview.chromium.org/453833003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:23:19 +00:00
sigurds@chromium.org
85058ce97d
Set ScopeInfo when compiling for unit tests.
...
This is required to correctly treat eval in unit tests.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/453953002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 11:24:24 +00:00
bmeurer@chromium.org
cf51230881
[turbofan] Add proper conversion operators for int32<->int64.
...
This affects arm64 and x64. Note that we do not yet optimize
these conversions. Later we will add support for merging these
conversion operators into other operations during instruction
selection.
TEST=cctest,compiler-unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/487723002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 08:48:41 +00:00
titzer@chromium.org
5281cbebca
Finish TODO in Schedule. s/entry/start/g and s/exit/end/g to be more regular.
...
R=jarin@chromium.org
BUG=
Review URL: https://codereview.chromium.org/484653002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-18 13:28:10 +00:00
bmeurer@chromium.org
e4db78e705
[arm] Recognize comparisons of shifts with zero.
...
For example, recognize
0 == r1 << r2
and generate a single
MOVS rt, r1, lsl r2
instruction.
TEST=cctest,compiler-unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/478233002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-18 11:10:01 +00:00
mstarzinger@chromium.org
3adac582b0
Deprecate LoweringBuilder in favor of Reducer.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/476733002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 12:24:37 +00:00
titzer@chromium.org
8741997982
Enable more tests for simplified lowering after assuming signed for word32.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/461933002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 09:52:21 +00:00
titzer@chromium.org
9803a72417
Unify MachineType and RepType.
...
MachineType now tracks both the representation and the value type of machine quantities and is used uniformly throughout TurboFan.
These types can now express uint8, int8, uint16, and int16, i.e. signed and unsigned smallish integers. Note that currently only uint8 and uint16 are implemented in the TF backends.
R=bmeurer@chromium.org , mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/470593002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 09:19:54 +00:00
bmeurer@chromium.org
ae7d781d8b
[turbofan] Introduce WordRor machine operator.
...
Move recognition of rotate-right operations to the
MachineOperatorReducer, so we don't need to repeat that in the
InstructionSelector for every backend.
TEST=base-unittests,compiler-unittests,cctests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/469213002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 09:07:58 +00:00
bmeurer@chromium.org
f4b5224ae9
[turbofan] Refactor the InstructionSelector tests.
...
Also fix some issues and improve test coverage.
TEST=compiler-unittests
BUG=v8:3489
LOG=y
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/469743002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 06:33:50 +00:00
mstarzinger@chromium.org
76a49573f3
Fix non-TF target build after r23107.
...
TBR=jarin@chromium.org
TEST=cctest/test-run-deopt
Review URL: https://codereview.chromium.org/473453002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 14:47:32 +00:00
mstarzinger@chromium.org
8b7dd630da
Move %IsOptimized runtime helper into test case.
...
R=jarin@chromium.org
TEST=cctest/test-run-deopt
Review URL: https://codereview.chromium.org/468153002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 14:09:50 +00:00
titzer@chromium.org
07ab6791a1
Add FOR_INT32_SHIFTS to value-helper.h
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/470533002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 10:30:00 +00:00
rodolph.perfetta@arm.com
b5b4e2c0b9
ARM64: unit tests for instruction selection.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/464773004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 10:29:22 +00:00
mstarzinger@chromium.org
44247036a7
Fix newly discovered presubmit errors.
...
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/462033002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 13:33:35 +00:00
jochen@chromium.org
5f1f897894
Revert 23077 - "Use CommonNodeCache for heap constants in ChangeLowering."
...
Breaks compilation on Mac64
| TEST=compiler-unittests
| R=jarin@chromium.org
|
| Committed: https://code.google.com/p/v8/source/detail?r=23077
TBR=bmeurer@chromium.org ,jarin@chromium.org
LOG=n
BUG=none
Review URL: https://codereview.chromium.org/456843004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:53:14 +00:00
titzer@chromium.org
0e77a31cbd
Fix presubmit error with explicit constructor in test.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/462813003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:41:50 +00:00
bmeurer@chromium.org
dae1e1ea01
Use CommonNodeCache for heap constants in ChangeLowering.
...
TEST=compiler-unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/466673004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:37:50 +00:00
sigurds@chromium.org
24f7a70df4
Provide mutators in NodeProperties instead of exposing indicies.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/462633003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:20:39 +00:00
titzer@chromium.org
81047ea644
Assume signed for converting to word32/float64 unless use or output is explicitly unsigned.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/461653002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 08:09:24 +00:00
titzer@chromium.org
f3ccf2d51b
Disable code generation in tests that use GraphBuilderTester on platforms that have no TF backend.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/457343003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 08:06:02 +00:00
paul.lind@imgtec.com
fe7860fce2
MIPS: Fix test-simplified-lowering to pass without tf implemention.
...
GenerateCode() only for SupportedTarget() in 3 places, as in the
other tests here.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/459913002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 18:54:40 +00:00
titzer@chromium.org
6fa2cee262
Move MachineRepresentation to machine-type.h and rename to MachineType in preparation for merging it with RepType.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/456333002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 15:55:28 +00:00
titzer@chromium.org
6603cbb319
Remove duplication in Scheduler and simplify interface. Make ComputeSchedule() and ComputeSpecialRPO() the only interface used by clients.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/460633002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 13:07:32 +00:00
jarin@chromium.org
1f776a07a6
Reland "More lazy deoptimization in Turbofan (binops, loads/stores)"
...
This relands commit r23029 + adds missing lazy deopts for JSAdd operator inside VisitForInStatement. The added lazy deopt still refers to a bogus bailout id, but at least the graphs can be scheduled.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/450103004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 12:26:17 +00:00
jarin@chromium.org
2558423c85
Revert "More lazy deoptimization in Turbofan (binops, loads/stores)"
...
This reverts commit r23029.
BUG=
TBR=eisinger@chromium.org
Review URL: https://codereview.chromium.org/460623002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 11:21:51 +00:00
jarin@chromium.org
d04a7d6d91
More lazy deoptimization in Turbofan (binops, loads/stores)
...
Deoptimizing binory operations, (Load|Store)(Property|Named),
constructors.
This also fixes safepoint lookup to account for lazily deoptimized code.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/453383002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 10:42:01 +00:00
titzer@chromium.org
7617f0dc1b
Fix size_t/int conversions for Win64.
...
TBR=jochen@chromium.org
BUG=
Review URL: https://codereview.chromium.org/459763002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 10:06:36 +00:00
titzer@chromium.org
670df5063b
Implement representation selection as part of SimplifiedLowering. Representation selection also
...
requires inserting explicit representation change nodes to be inserted in the graph. Such nodes
are pure, but also need to be lowered to machine operators. They need to be scheduled first, to
determine the control input for any branches inside.
This CL requires extensive testing. More tests to follow.
R=rossberg@chromium.org
BUG=
Review URL: https://codereview.chromium.org/425003004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 09:40:02 +00:00
jarin@chromium.org
e1deee4181
Revert "Initial shot at deoptimizing JSCallFunction in Turbofan."
...
This reverts commit r23020.
BUG=
TBR=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/453363003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 07:33:58 +00:00
jarin@chromium.org
5c2e968bdb
Initial shot at deoptimizing JSCallFunction in Turbofan.
...
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/444883006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 06:55:16 +00:00
mstarzinger@chromium.org
0e47697c18
Minor simplification and cleanup of graph builder.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/448113002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 13:51:30 +00:00
sigurds@chromium.org
055fe8c3e9
Update and extend context specialization.
...
* Add store-chain folding to context specialization.
* Replace all uses of context with constant and then use
a visitor to find the places to optimize.
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/440053002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-08 11:05:31 +00:00
mstarzinger@chromium.org
6fce0d4df3
Remove dangerous default parameter from machine Store operator.
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/451593002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 11:01:02 +00:00