Reviewers: Igor Sheludko,
Message:
PTAL
Description:
Skip dead blocks/instructions in store elimination.
Also improve tracing.
Please review this at https://codereview.chromium.org/297933002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -3 lines):
M src/hydrogen-store-elimination.cc
Index: src/hydrogen-store-elimination.cc
diff --git a/src/hydrogen-store-elimination.cc
b/src/hydrogen-store-elimination.cc
index
bbb115a9b40dfb67935a2ec34bf7641cb3d430c9..e8e8da0267093dced57ae63add550062fe866ea1
100644
--- a/src/hydrogen-store-elimination.cc
+++ b/src/hydrogen-store-elimination.cc
@@ -30,8 +30,10 @@ void HStoreEliminationPhase::Run() {
for (int i = 0; i < graph()->blocks()->length(); i++) {
unobserved_.Rewind(0);
HBasicBlock* block = graph()->blocks()->at(i);
+ if (!block->IsReachable()) continue;
for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
HInstruction* instr = it.Current();
+ if (instr->CheckFlag(HValue::kIsDead)) continue;
// TODO(titzer): eliminate unobserved HStoreKeyed instructions too.
switch (instr->opcode()) {
@@ -97,17 +99,20 @@ void HStoreEliminationPhase::ProcessInstr(HInstruction*
instr,
GVNFlagSet flags) {
if (unobserved_.length() == 0) return; // Nothing to do.
if (instr->CanDeoptimize()) {
- TRACE(("-- Observed stores at I%d (might deoptimize)\n", instr->id()));
+ TRACE(("-- Observed stores at I%d (%s might deoptimize)\n",
+ instr->id(), instr->Mnemonic()));
unobserved_.Rewind(0);
return;
}
if (instr->CheckChangesFlag(kNewSpacePromotion)) {
- TRACE(("-- Observed stores at I%d (might GC)\n", instr->id()));
+ TRACE(("-- Observed stores at I%d (%s might GC)\n",
+ instr->id(), instr->Mnemonic()));
unobserved_.Rewind(0);
return;
}
if (instr->DependsOnFlags().ContainsAnyOf(flags)) {
- TRACE(("-- Observed stores at I%d (GVN flags)\n", instr->id()));
+ TRACE(("-- Observed stores at I%d (GVN flags of %s)\n",
+ instr->id(), instr->Mnemonic()));
unobserved_.Rewind(0);
return;
}
--
--
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.