Revision: 19429
Author:   [email protected]
Date:     Tue Feb 18 09:59:02 2014 UTC
Log:      A64: Optimize a loop by using post-indexing.

[email protected]

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

Modified:
 /branches/bleeding_edge/src/a64/full-codegen-a64.cc

=======================================
--- /branches/bleeding_edge/src/a64/full-codegen-a64.cc Mon Feb 17 16:08:44 2014 UTC +++ /branches/bleeding_edge/src/a64/full-codegen-a64.cc Tue Feb 18 09:59:02 2014 UTC
@@ -2805,16 +2805,13 @@

// Loop through all the keys in the descriptor array. If one of these is the
   // string "valueOf" the result is false.
-  // TODO(all): optimise this loop to combine the add and ldr into an
-  // addressing mode.
   Register valueof_string = x1;
+  int descriptor_size = DescriptorArray::kDescriptorSize * kPointerSize;
   __ Mov(valueof_string, Operand(isolate()->factory()->value_of_string()));
   __ Bind(&loop);
-  __ Ldr(x15, MemOperand(descriptors));
+  __ Ldr(x15, MemOperand(descriptors, descriptor_size, PostIndex));
   __ Cmp(x15, valueof_string);
   __ B(eq, if_false);
-  __ Add(descriptors, descriptors,
-         DescriptorArray::kDescriptorSize * kPointerSize);
   __ Cmp(descriptors, descriptors_end);
   __ B(ne, &loop);

--
--
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