Revision: 14692
Author:   [email protected]
Date:     Wed May 15 08:17:01 2013
Log: 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=
[email protected]

Review URL: https://codereview.chromium.org/14772043
http://code.google.com/p/v8/source/detail?r=14692

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/mips/code-stubs-mips.cc
 /branches/bleeding_edge/test/mjsunit/allocation-site-info.js

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Tue May 14 08:30:55 2013 +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed May 15 08:17:01 2013
@@ -4790,6 +4790,7 @@
   __ 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.
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h      Tue May 14 06:10:52 2013
+++ /branches/bleeding_edge/src/flag-definitions.h      Wed May 15 08:17:01 2013
@@ -258,7 +258,7 @@
             "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")
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue May 14 17:57:19 2013 +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed May 15 08:17:01 2013
@@ -5158,6 +5158,7 @@
   __ 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.
=======================================
--- /branches/bleeding_edge/test/mjsunit/allocation-site-info.js Wed May 8 01:49:29 2013 +++ /branches/bleeding_edge/test/mjsunit/allocation-site-info.js Wed May 15 08:17:01 2013
@@ -28,10 +28,6 @@
 // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
 // Flags: --track-allocation-sites --noalways-opt

-// TODO(mvstanton): remove --nooptimize-constructed-arrays and enable
-// the constructed array code below when the feature is turned on
-// by default.
-
 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
 // time sticks if built with snapshot.  If --smi-only-arrays is deactivated
@@ -41,7 +37,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.


Reply via email to