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
sigurds@chromium.org
32c4ed8d21
Directly use OperatorProperties where possible instead.
...
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 09:14:47 +00:00
jarin@chromium.org
117945ec6e
Add deoptimization translations.
...
BUG=
R=bmeurer@chromium.org , mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/442253002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-06 11:49:02 +00:00
bmeurer@chromium.org
878a0742cc
[arm64] Fix.
...
TBR=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/444663002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 14:21:07 +00:00
bmeurer@chromium.org
bbd62e4a20
[turbofan] Improve testability of the InstructionSelector.
...
Allow to pass the set of supported CPU features to
the InstructionSelector, so it can be tested without
messing with the command line flags.
Also add InstructionSelector sample for ia32.
TEST=cctest/test-instruction-selector,cctest/test-instruction-selector-{arm,ia32}
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/441883004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 13:26:55 +00:00
bmeurer@chromium.org
70e7a119e6
Cleanup V8_TURBOFAN_TARGET definition.
...
Move to globals.h so we do no longer skip any number of
tests. Introduce V8_TURBOFAN_BACKEND, which is 1 if we
actually have a backend and want to compile it, but don't
run the tests.
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/444503003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 11:53:32 +00:00
sigurds@chromium.org
8322577eeb
Make start node a value input to parameter nodes.
...
BUG=
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/437183002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 08:47:39 +00:00
titzer@chromium.org
7a48b84856
Fix more stack smashing bugs in test.
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/415403008
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 14:17:52 +00:00
titzer@chromium.org
0898e9ece2
Fix build on Win64 for tests.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/423073008
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 13:27:33 +00:00
titzer@chromium.org
60fb024ad6
TF: simplified-lowering tests accidentally ran on unsupported platforms.
...
TBR=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/433423005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 12:51:34 +00:00
titzer@chromium.org
a638717dbe
Add support for untagged LoadField, StoreField, LoadElement, and StoreElement simplfied operators. This is needed for untagged accesses of typed array backing stores and generally cleans up.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/439223004
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 12:39:15 +00:00
bmeurer@chromium.org
d07a2eb806
Rename ASSERT* to DCHECK*.
...
This way we don't clash with the ASSERT* macros
defined by GoogleTest, and we are one step closer
to being able to replace our homegrown base/ with
base/ from Chrome.
R=jochen@chromium.org , svenpanne@chromium.org
Review URL: https://codereview.chromium.org/430503007
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 11:34:54 +00:00
bmeurer@chromium.org
35f0976895
[turbofan] Support for combining branches with <Operation>WithOverflow.
...
Also unify the handling of binops in the InstructionSelector
backends.
TEST=cctest/test-run-machops,cctest/test-instruction-selector-arm
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/415403005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 08:18:37 +00:00
bmeurer@chromium.org
ba12ca16a2
[turbofan] Add support for Int32SubWithOverflow.
...
TEST=cctest/test-run-machops,cctest/test-instruction-selector-arm
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/432373002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-01 12:18:20 +00:00
bmeurer@chromium.org
6161d4305d
[arm] Unify instruction selector for Word32Neg.
...
Previously code generation for Word32Neg (implemented as Word32Xor
with -1) was somewhat adhoc and not complete. Now it's uniform
and supports the full range of operand2's.
TEST=cctest/test-instruction-selector-arm,cctest/test-run-machops
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/434923002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-01 11:14:47 +00:00
titzer@chromium.org
ee7f97c8a0
TF: Rename ConvertXToY machine operators to ChangeXToY.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/435923002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-01 10:54:58 +00:00
bmeurer@chromium.org
6ccb8704f2
[turbofan] Add Int32AddWithOverflow machine operator.
...
TEST=cctest/test-run-machops,cctest/test-instruction-selector-arm
R=titzer@chromium.org
Review URL: https://codereview.chromium.org/436593002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-01 09:32:58 +00:00
titzer@chromium.org
0e0614ec47
Fix compile error on Win32.
...
R=hpayer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/435883002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-01 08:38:16 +00:00