Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: src/codegen-arm.cc

Issue 2002: Fix performace regression due to missed peephole optimization (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
===================================================================
--- src/codegen-arm.cc (revision 282)
+++ src/codegen-arm.cc (working copy)
@@ -948,6 +948,7 @@
ASSERT(var()->mode() != Variable::DYNAMIC);
Label exit;
+ bool skipped_write = false;
if (init_state == CONST_INIT) {
ASSERT(var()->mode() == Variable::CONST);
// Only the first const initialization must be executed (the slot
@@ -957,6 +958,7 @@
masm->ldr(r2, ArmCodeGenerator::SlotOperand(masm, scope, this, r2));
masm->cmp(r2, Operand(Factory::the_hole_value()));
masm->b(ne, &exit);
+ skipped_write = true;
}
// We must execute the store.
@@ -981,7 +983,9 @@
masm->mov(r3, Operand(offset));
masm->RecordWrite(r2, r3, r1);
}
- masm->bind(&exit);
+ // If we did not jump over the assignment, we do not need to bind the
+ // exit label. Doing so can defeat peephole optimization.
+ if (skipped_write) masm->bind(&exit);
iposva 2008/09/11 18:25:11 Why do you introduce a separate variable for testi
}
}
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698