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

Unified Diff: src/jump-target-ia32.cc

Issue 13234: Experimental: three small codegen changes.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years 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 | « src/codegen-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jump-target-ia32.cc
===================================================================
--- src/jump-target-ia32.cc (revision 927)
+++ src/jump-target-ia32.cc (working copy)
@@ -108,7 +108,17 @@
expected_frame_->Forget(expected_frame_->height());
}
if (!expected_frame_->IsMergable()) {
+ // For a branch, the frame at the fall-through basic block (not
+ // labeled) does not need to be mergable, but only the other (labeled)
+ // one. That is achieved by reversing the condition and emitting the
+ // make mergable code as the actual fall-through block.
+ Label original_fall_through;
+ __ j(NegateCondition(cc), &original_fall_through, NegateHint(hint));
expected_frame_->MakeMergable();
+ __ jmp(&label_);
+ __ bind(&original_fall_through);
iposva 2008/12/08 06:32:32 How often do you expect this double jump to happen
Kevin Millikin (Chromium) 2008/12/08 08:26:28 Only when the frame contains constants that are sy
+ } else {
+ __ j(cc, &label_, hint);
}
} else {
// No code needs to be emitted to merge to the expected frame at the
@@ -116,9 +126,8 @@
if (!code_generator_->IsActualFunctionReturn(this)) {
current_frame->MergeTo(expected_frame_);
}
+ __ j(cc, &label_, hint);
}
-
- __ j(cc, &label_, hint);
// Postcondition: there is both a current frame and an expected frame at
// the label and they match.
}
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698