Reviewers: Michael Starzinger,
Message:
Hi Michael, here is the CL we discussed, thanks!
--Michael
Description:
With flag optimize-constructed-arrays on, ARM and MIPS suffered a
performance
degrade due to incorrect code in GenerateRecordCallTarget().
The CL also enables flag optimize-constructed-arrays.
BUG=
Please review this at https://codereview.chromium.org/14772043/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/code-stubs-arm.cc
M src/flag-definitions.h
M src/mips/code-stubs-mips.cc
M test/mjsunit/allocation-site-info.js
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index
98e5d8fecd9861b19fdc88156e63b38f516420bd..a7d2b81fce6a531bfee832dfb2408ae6b5c753ef
100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -4790,6 +4790,7 @@ static void GenerateRecordCallTarget(MacroAssembler*
masm) {
__ bind(&megamorphic);
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
__ str(ip, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset));
+ __ jmp(&done);
// An uninitialized cache is patched with the function or sentinel to
// indicate the ElementsKind if function is the Array constructor.
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
95bea4a40292ae9c59ebfd73fe5b824f2e61f64d..3cffa7bb4539d9e322bcc6f4e3b2f6343d93f68a
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -258,7 +258,7 @@ DEFINE_bool(unreachable_code_elimination, false,
"eliminate unreachable code (hidden behind soft deopts)")
DEFINE_bool(track_allocation_sites, true,
"Use allocation site info to reduce transitions")
-DEFINE_bool(optimize_constructed_arrays, false,
+DEFINE_bool(optimize_constructed_arrays, true,
"Use allocation site info on constructed arrays")
DEFINE_bool(trace_osr, false, "trace on-stack replacement")
DEFINE_int(stress_runs, 0, "number of stress runs")
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index
48e7e2b8c6d58fd12d6ac3698f4987aa0196a4c9..fe33478f74ab4a66a4425b4565f6807ef5379c08
100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -5158,6 +5158,7 @@ static void GenerateRecordCallTarget(MacroAssembler*
masm) {
__ bind(&megamorphic);
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
__ sw(at, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset));
+ __ jmp(&done);
// An uninitialized cache is patched with the function or sentinel to
// indicate the ElementsKind if function is the Array constructor.
Index: test/mjsunit/allocation-site-info.js
diff --git a/test/mjsunit/allocation-site-info.js
b/test/mjsunit/allocation-site-info.js
index
5c7ae13094f939640a5e15677010ac2877161ccf..d43d2630671b907addd7d37709e479d0b2eeaa85
100644
--- a/test/mjsunit/allocation-site-info.js
+++ b/test/mjsunit/allocation-site-info.js
@@ -41,7 +41,7 @@
// support_smi_only_arrays = %HasFastSmiElements(new
Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true;
-optimize_constructed_arrays = false;
+optimize_constructed_arrays = true;
if (support_smi_only_arrays) {
print("Tests include smi-only arrays.");
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.