Commit Graph

88 Commits

Author SHA1 Message Date
bmeurer@chromium.org
1ef9e22900 [x64] 64-bit shift left by 32 or more covers sign/zero extend.
TEST=unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25123}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 05:58:15 +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
dcarney@chromium.org
7cb25f5020 [turbofan] add RegisterConfiguration to decouple arch specific register layouts from compiler
R=bmeurer@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25097}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 09:22:32 +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
744c66bc29 [turbofan] Introduce separate SelectLowering reducer.
Split lowering of Select nodes into a separate graph reducer and be more
clever when lowering to diamonds, i.e. reuse diamonds that have the same
condition and only add more phis to it.

TEST=unittests
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25078}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 15:17:47 +00:00
dcarney@chromium.org
0d1cdebad2 [turbofan] initial framework for unittesting of register allocator
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25071}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 13:27:23 +00:00
baptiste.afsa@arm.com
bb78f231ab [turbofan] Select tbz/tbnz when possible on ARM64.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25063}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 10:29:11 +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
bmeurer@chromium.org
948ce2141e [turbofan] First step towards correctified 64-bit addressing.
Also remove the LEA matching from x64, since it was never really
effective. We'll optimize that once we're correct.

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

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

Cr-Commit-Position: refs/heads/master@{#25024}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-31 06:41:41 +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
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
dcarney@chromium.org
ee9de33075 [turbofan] move Node to vreg mapping to InstructionSelector
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25010}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 09:50:41 +00:00
dcarney@chromium.org
7f94583f79 [turbofan] add configuration parameters for register allocator
T=jarin@chromium.org

BUG=
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25008}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 09:01:47 +00:00
titzer@chromium.org
5c25fdb65e Inline trivial OperatorProperties methods.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24995}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 18:47:14 +00:00
baptiste.afsa@arm.com
df312d90f0 [turbofan] Bug fix in arm64 ubfx selection.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24989}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 16:47:45 +00:00
titzer@chromium.org
6c6a71b3f7 Move input/output counts directly into Operators, simplying OperatorProperties.
This is a first step to refactoring OperatorProperties out of existence.
The next step is to inline OperatorProperties::GetXXXCount into the callers.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24983}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 14:41:18 +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
baptiste.afsa@arm.com
3901244107 [arm64] Turn Word64And into tst instruction when possible.
Also add corresponding unit tests.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24974}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 10:51:46 +00:00
bmeurer@chromium.org
81aaeb476d [turbofan] Complete support for integer division/modulus in simplified lowering.
Also add backend flags that tell whether integer division/modulus is
generally safe, i.e. does not trap on overflow or divide by zero.

TEST=unittests
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24942}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 13:56:46 +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
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
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
1e96221bbb [turbofan] Minor cleanups to lowering of typed array loads/stores.
TEST=unittests
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24917}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 08:29:19 +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
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
jarin@chromium.org
23df66ee24 Add more missing deopts
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24886}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-26 10:25:48 +00:00
baptiste.afsa@arm.com
878ff91c8f [arm64] Use logical immediates when matching tst instructions.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24882}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 15:29:44 +00:00
sigurds@chromium.org
df9ac2c165 Add Float64Floor, Float64Ceil, Float64RoundTruncate, Float64RoundTiesAway operators.
These operators are not supported by any backends yet, and a backend is free to not support them.

R=bmeurer@chromium.org
TEST=unittest/machine-operator

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

Cr-Commit-Position: refs/heads/master@{#24874}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 13:12:12 +00:00
bmeurer@chromium.org
548fb46331 [x86] Fix register constraints for multiply-high.
TEST=mjsunit/compiler,unittests
R=titzer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-24 09:36:40 +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
dcarney@chromium.org
5f83dabb60 [turbofan] split compilation stats off from HStatistics and track high water marks
R=jarin@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-23 09:14:35 +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
jochen@chromium.org
2147d5a145 Use an idle notification of 0ms as hint that a GC after context disposal is triggerd
BUG=none
R=ulan@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 12:56:52 +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
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
svenpanne@chromium.org
3de17c6950 Remove v8stdint.h, it doesn't serve a purpose anymore.
Basically a follow-up to https://codereview.chromium.org/667573005/.

LOG=y
R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:25:14 +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
mvstanton@chromium.org
c688ebd858 vector-based ICs did not update type feedback counts correctly.
BUG=v8:3605
LOG=N
R=jkummerow@chromium.org, ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:42:56 +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
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
bmeurer@chromium.org
d029d76120 [turbofan] Skip bounds checks for positive indices only.
TEST=unittests,mjsunit/asm/int32array-constant-key
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 06:25:41 +00:00
bmeurer@chromium.org
a779150260 [turbofan] Eliminate typed array bounds checks if both key and length are constant.
TEST=mjsunit,unittests
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 09:35:45 +00:00
dslomov@chromium.org
7cf9d1c807 Share code between Factory::NewJSTypedArray and API
R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 09:04:58 +00:00
bmeurer@chromium.org
fe6656fbfe [arm] Prefer BIC over BFC.
BFC requires same register for input and output and causes introduction
of some unneccesary gap moves.

TEST=unittests,mjsunit
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 07:07:54 +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
baptiste.afsa@arm.com
573ca15f48 [turbofan] Add support for shifted and rotated operands on ARM64.
R=bmeurer@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 09:28:53 +00:00