Reviewers: ulan, jochen,

Description:
Reland "A64: Now that we have veneers, fix a couple of branches to directly jump
to their target."

This was reverted by revision 20187.

make -j45 arm64.release.check TESTFLAGS=--time
TESTJOBS=mozilla/js1_5/Regress/regress-280769-2


Without the patch:
--- Total time: 00:07.039 ---
   1 (00:07.016) mozilla/js1_5/Regress/regress-280769-2
   2 (00:01.814) mozilla/js1_5/Regress/regress-280769-2
   3 (00:01.812) mozilla/js1_5/Regress/regress-280769-2

With the patch:
--- Total time: 00:12.252 ---
   1 (00:12.226) mozilla/js1_5/Regress/regress-280769-2
   2 (00:04.217) mozilla/js1_5/Regress/regress-280769-2
   3 (00:04.213) mozilla/js1_5/Regress/regress-280769-2

Please review this at https://codereview.chromium.org/236163006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+3, -12 lines):
  M src/arm64/regexp-macro-assembler-arm64.cc


Index: src/arm64/regexp-macro-assembler-arm64.cc
diff --git a/src/arm64/regexp-macro-assembler-arm64.cc b/src/arm64/regexp-macro-assembler-arm64.cc index decf314fa798d58194e11ad569e3b95fa1456b30..1cce0a66a2b24e2a0b1b5d43815c512715e78fa3 100644
--- a/src/arm64/regexp-macro-assembler-arm64.cc
+++ b/src/arm64/regexp-macro-assembler-arm64.cc
@@ -1481,12 +1481,7 @@ void RegExpMacroAssemblerARM64::BranchOrBacktrack(Condition condition,
   if (to == NULL) {
     to = &backtrack_label_;
   }
- // TODO(ulan): do direct jump when jump distance is known and fits in imm19.
-  Condition inverted_condition = InvertCondition(condition);
-  Label no_branch;
-  __ B(inverted_condition, &no_branch);
-  __ B(to);
-  __ Bind(&no_branch);
+  __ B(condition, to);
 }

 void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg,
@@ -1497,15 +1492,11 @@ void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg,
     if (to == NULL) {
       to = &backtrack_label_;
     }
- // TODO(ulan): do direct jump when jump distance is known and fits in imm19.
-    Label no_branch;
     if (condition == eq) {
-      __ Cbnz(reg, &no_branch);
+      __ Cbz(reg, to);
     } else {
-      __ Cbz(reg, &no_branch);
+      __ Cbnz(reg, to);
     }
-    __ B(to);
-    __ Bind(&no_branch);
   } else {
     __ Cmp(reg, immediate);
     BranchOrBacktrack(condition, to);


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to