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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 7021007: Optimise the deoptimisation check to improve performance on modern ARM cores.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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
« src/arm/assembler-arm.cc ('K') | « src/arm/constants-arm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
===================================================================
--- src/arm/lithium-codegen-arm.cc (revision 7890)
+++ src/arm/lithium-codegen-arm.cc (working copy)
@@ -595,19 +595,28 @@
return;
}
+ if (FLAG_trap_on_deopt) {
+ __ stop("trap_on_deopt", cc);
+ }
+
if (cc == al) {
- if (FLAG_trap_on_deopt) __ stop("trap_on_deopt");
+ // We don't need to optimize this code since the branch is always taken.
__ Jump(entry, RelocInfo::RUNTIME_ENTRY);
} else {
Søren Thygesen Gjesse 2011/05/16 07:26:39 The x64 also uses a jump table, which is emitted a
- if (FLAG_trap_on_deopt) {
- Label done;
- __ b(&done, NegateCondition(cc));
- __ stop("trap_on_deopt");
- __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
- __ bind(&done);
- } else {
- __ Jump(entry, RelocInfo::RUNTIME_ENTRY, cc);
- }
+ Label record_deopt_jump_entry;
+ __ bind(&record_deopt_jump_entry);
+ // This breakpoint will be patched to a branch to the correct location when
+ // the deoptimization jump table is emitted (in Assembler::CheckConstPool).
+ // This happens before the code is executed so we should actually never hit
+ // this breakpoint.
+ // Make sure the constant pool is not emitted between our record and the
+ // breakpoint instruction.
+ __ BlockConstPoolFor(1);
+ __ RecordDeoptJumpEntry(entry, cc);
+ __ bkpt(kBkptUninitializedCode);
+ // This is a performance critical section. We don't want to emit more
+ // than this breakpoint patched to an almost never taken branch.
+ ASSERT(__ InstructionsGeneratedSince(&record_deopt_jump_entry) == 1);
}
}
« src/arm/assembler-arm.cc ('K') | « src/arm/constants-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698