bmeurer
acd9c46ca7
[turbofan] Optimize certain chains of Branch into a Switch.
...
This adds a new ControlFlowOptimizer that - for now - recognizes chains
of Branches generated by the SwitchBuilder for a subset of javascript
switches into Switch nodes. Those Switch nodes are then lowered to
either table or lookup switches.
Also rename Case to IfValue (and introduce IfDefault) for consistency.
BUG=v8:3872
LOG=n
Review URL: https://codereview.chromium.org/931623002
Cr-Commit-Position: refs/heads/master@{#26691}
2015-02-17 13:29:46 +00:00
bmeurer
1df5fed50a
[turbofan] Cleanup the NodeProperties.
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/883613006
Cr-Commit-Position: refs/heads/master@{#26316}
2015-01-29 09:18:09 +00:00
bmeurer
59a02ebdbe
[turbofan] Ensure that NTLs are always properly connected to the end.
...
Up until now we used a special Terminate node to artifically connect non
terminating loops to the End node, but this was kind of adhoc and didn't
work for the CFG. So without all kinds of weird hacks, the end block in
the CFG will not be connected to NTLs, which makes it impossible to
compute post dominance / control dependence in the current setting.
So instead of Terminate, we add a special Branch to NTLs, whose
condition is the special Always node, which corresponds to True, except
that it cannot be folded away. This way we don't need any special
machinery in the scheduler, since it's just a regular Branch.
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/875263004
Cr-Commit-Position: refs/heads/master@{#26294}
2015-01-27 14:02:28 +00:00
bmeurer
4f1597a92d
[turbofan] Add new JSIntrinsicsLowering reducer.
...
The lowering of intrinsics is therefore now decoupled from the general
inlining logic.
TEST=cctest,unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/872363002
Cr-Commit-Position: refs/heads/master@{#26263}
2015-01-26 09:06:03 +00:00
titzer
3442a5f9e0
[turbofan] First version of loop peeling.
...
BUG=
Review URL: https://codereview.chromium.org/816053002
Cr-Commit-Position: refs/heads/master@{#26149}
2015-01-20 09:45:17 +00:00
bmeurer
4914716387
Revert of [turbofan] Use PlainPrimitiveToNumber whenever possible. (patchset #1 id:1 of https://codereview.chromium.org/852763002/ )
...
Reason for revert:
Tanks performance of SQLite and towers.c.
Original issue's description:
> [turbofan] Use PlainPrimitiveToNumber whenever possible.
>
> TEST=cctest,unittests
> R=jarin@chromium.org
>
> Committed: https://crrev.com/1a5db24e6bf831e61e3f4aa0c252f77e48c3689c
> Cr-Commit-Position: refs/heads/master@{#26071}
TBR=jarin@chromium.org ,dcarney@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/852153003
Cr-Commit-Position: refs/heads/master@{#26078}
2015-01-15 13:26:55 +00:00
bmeurer
1a5db24e6b
[turbofan] Use PlainPrimitiveToNumber whenever possible.
...
TEST=cctest,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/852763002
Cr-Commit-Position: refs/heads/master@{#26071}
2015-01-15 09:49:23 +00:00
bmeurer
214387fce1
Revert of [turbofan] Improve typed lowering of JSBitwiseAnd. (patchset #1 id:1 of https://codereview.chromium.org/811653004/ )
...
Reason for revert:
Breaks SQLite
Original issue's description:
> [turbofan] Improve typed lowering of JSBitwiseAnd.
>
> TEST=unittests
> R=jarin@chromium.org
>
> Committed: https://crrev.com/284e1108182995abe85f580bc813d26491642b8c
> Cr-Commit-Position: refs/heads/master@{#26046}
TBR=jarin@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/795833006
Cr-Commit-Position: refs/heads/master@{#26048}
2015-01-14 09:07:07 +00:00
Benedikt Meurer
284e110818
[turbofan] Improve typed lowering of JSBitwiseAnd.
...
TEST=unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/811653004
Cr-Commit-Position: refs/heads/master@{#26046}
2015-01-14 07:40:32 +00:00
Benedikt Meurer
9def087efc
[turbofan] Correctify JSToBoolean lowering.
...
Introduce a new AnyToBoolean simplified operator to handle the later
lowering of boolean conversions. Previously we tried to hack that with
the generic JSToBoolean, having its context set to zero, but that lead
to various problems/bugs and did not handle all cases.
TEST=cctest,unittests
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/800833003
Cr-Commit-Position: refs/heads/master@{#25958}
2015-01-05 13:44:31 +00:00
bmeurer
eeec886e5f
[turbofan] Deinlinify OperatorProperties implementation.
...
TEST=cctest,unittests
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/821913002
Cr-Commit-Position: refs/heads/master@{#25935}
2014-12-23 12:50:51 +00:00
Benedikt Meurer
1ec1f5957f
[turbofan] Cleanup use of virtual, OVERRIDE, FINAL.
...
Following the Google/Chromium coding style wrt. virtual, OVERRIDE and
FINAL specifications.
TEST=unittests
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/816453005
Cr-Commit-Position: refs/heads/master@{#25924}
2014-12-22 13:48:10 +00:00
Benedikt Meurer
2bf048f46c
[turbofan] Reduce context accesses during typed lowering.
...
TEST=unittests
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/776243002
Cr-Commit-Position: refs/heads/master@{#25656}
2014-12-04 10:50:58 +00:00
Benedikt Meurer
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
jarin
322bb23e82
[turbofan] Insert appropriate conversions for typed array stores.
...
BUG=
Review URL: https://codereview.chromium.org/758643003
Cr-Commit-Position: refs/heads/master@{#25496}
2014-11-25 08:40:29 +00:00
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
titzer@chromium.org
faa71f966a
Introduce Diamond, a helper for building diamond-shaped control patterns.
...
R=mstarzinger@chromium.org , bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/694063005
Cr-Commit-Position: refs/heads/master@{#25110}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 14:37:44 +00:00
bmeurer@chromium.org
3897182246
[turbofan] Add AllocateHeapNumberStub to avoid runtime call.
...
TEST=unittests
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/703473004
Cr-Commit-Position: refs/heads/master@{#25107}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 12:58:49 +00:00
sigurds@chromium.org
75ac43928b
Add floor, ceil, round (truncate) instructions for ia32, x64 (if SSE4.1) and
...
add floor, ceil, round (truncate and away from zero) for arm64.
R=bmeurer@chromium.org , dcarney@chromium.org , mstarzinger@chromium.org , rodolph.perfetta@arm.com
TEST=test/mjsunit/asm/math-floor.js,test/mjsunit/asm/math-ceil.js,test/unittest/compiler/js-builtin-reducer-unittest.cc
Review URL: https://codereview.chromium.org/677433002
Cr-Commit-Position: refs/heads/master@{#25018}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 14:16:15 +00:00
bmeurer@chromium.org
de088f207c
[turbofan] Introduce new Select operator to improve bounds checking.
...
TEST=mjsunit,unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/691513002
Cr-Commit-Position: refs/heads/master@{#24980}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 14:17:14 +00:00
bmeurer@chromium.org
2c78a23c56
[turbofan] LoadElement should not have a control input.
...
TEST=unittests
R=dcarney@chromium.org
Review URL: https://codereview.chromium.org/685723002
Cr-Commit-Position: refs/heads/master@{#24935}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 13:00:42 +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
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