Revision: 21463
Author:   [email protected]
Date:     Fri May 23 11:48:40 2014 UTC
Log:      Skip dead blocks/instructions in store elimination.

Also improve tracing.

[email protected]

Review URL: https://codereview.chromium.org/297933002
http://code.google.com/p/v8/source/detail?r=21463

Modified:
 /branches/bleeding_edge/src/hydrogen-store-elimination.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen-store-elimination.cc Thu May 22 07:40:07 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-store-elimination.cc Fri May 23 11:48:40 2014 UTC
@@ -30,8 +30,10 @@
   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 @@
     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.

Reply via email to