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

Side by Side Diff: src/hydrogen.cc

Issue 12211128: Don't try to unlink instructions twice during GVN (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 instr->id(), 2713 instr->id(),
2714 instr->Mnemonic(), 2714 instr->Mnemonic(),
2715 other->id(), 2715 other->id(),
2716 other->Mnemonic()); 2716 other->Mnemonic());
2717 if (instr->HasSideEffects()) removed_side_effects_ = true; 2717 if (instr->HasSideEffects()) removed_side_effects_ = true;
2718 instr->DeleteAndReplaceWith(other); 2718 instr->DeleteAndReplaceWith(other);
2719 } else { 2719 } else {
2720 map->Add(instr, zone()); 2720 map->Add(instr, zone());
2721 } 2721 }
2722 } 2722 }
2723 if (instr->CheckFlag(HValue::kTrackSideEffectDominators)) { 2723 if (instr->IsLinked() &&
2724 instr->CheckFlag(HValue::kTrackSideEffectDominators)) {
2724 for (int i = 0; i < kNumberOfTrackedSideEffects; i++) { 2725 for (int i = 0; i < kNumberOfTrackedSideEffects; i++) {
2725 HValue* other = dominators->at(i); 2726 HValue* other = dominators->at(i);
2726 GVNFlag changes_flag = HValue::ChangesFlagFromInt(i); 2727 GVNFlag changes_flag = HValue::ChangesFlagFromInt(i);
2727 GVNFlag depends_on_flag = HValue::DependsOnFlagFromInt(i); 2728 GVNFlag depends_on_flag = HValue::DependsOnFlagFromInt(i);
2728 if (instr->DependsOnFlags().Contains(depends_on_flag) && 2729 if (instr->DependsOnFlags().Contains(depends_on_flag) &&
2729 (other != NULL)) { 2730 (other != NULL)) {
2730 TRACE_GVN_5("Side-effect #%d in %d (%s) is dominated by %d (%s)\n", 2731 TRACE_GVN_5("Side-effect #%d in %d (%s) is dominated by %d (%s)\n",
2731 i, 2732 i,
2732 instr->id(), 2733 instr->id(),
2733 instr->Mnemonic(), 2734 instr->Mnemonic(),
2734 other->id(), 2735 other->id(),
2735 other->Mnemonic()); 2736 other->Mnemonic());
2736 instr->SetSideEffectDominator(changes_flag, other); 2737 instr->SetSideEffectDominator(changes_flag, other);
Michael Starzinger 2013/02/12 13:58:23 There is another corner-case that is not yet cover
2737 } 2738 }
2738 } 2739 }
2739 } 2740 }
2740 instr = next; 2741 instr = next;
2741 } 2742 }
2742 2743
2743 HBasicBlock* dominator_block; 2744 HBasicBlock* dominator_block;
2744 GvnBasicBlockState* next = 2745 GvnBasicBlockState* next =
2745 current->next_in_dominator_tree_traversal(zone(), &dominator_block); 2746 current->next_in_dominator_tree_traversal(zone(), &dominator_block);
2746 2747
(...skipping 7883 matching lines...) Expand 10 before | Expand all | Expand 10 after
10630 } 10631 }
10631 } 10632 }
10632 10633
10633 #ifdef DEBUG 10634 #ifdef DEBUG
10634 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10635 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10635 if (allocator_ != NULL) allocator_->Verify(); 10636 if (allocator_ != NULL) allocator_->Verify();
10636 #endif 10637 #endif
10637 } 10638 }
10638 10639
10639 } } // namespace v8::internal 10640 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698