Revision: 19739
Author: [email protected]
Date: Mon Mar 10 07:42:09 2014 UTC
Log: Skip unreachable blocks when looking for next emitted block.
Goto does not emit a jump if the target is the next emitted block.
However, if there is an unreachable block between Goto and the jump
target, we still emit a jump even though the unreachable block is
not actually emitted. That jump is unnecessary.
[email protected]
Review URL: https://codereview.chromium.org/174883002
http://code.google.com/p/v8/source/detail?r=19739
Modified:
/branches/bleeding_edge/src/lithium-codegen.cc
=======================================
--- /branches/bleeding_edge/src/lithium-codegen.cc Wed Feb 19 14:03:48 2014
UTC
+++ /branches/bleeding_edge/src/lithium-codegen.cc Mon Mar 10 07:42:09 2014
UTC
@@ -142,6 +142,7 @@
int LCodeGenBase::GetNextEmittedBlock() const {
for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
+ if (!graph()->blocks()->at(i)->IsReachable()) continue;
if (!chunk_->GetLabel(i)->HasReplacement()) return i;
}
return -1;
--
--
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/d/optout.