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

Side by Side Diff: src/hydrogen.cc

Issue 9452022: Speed up removing phi nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.cc » ('J')
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ASSERT(!IsStartBlock()); 90 ASSERT(!IsStartBlock());
91 phis_.Add(phi); 91 phis_.Add(phi);
92 phi->SetBlock(this); 92 phi->SetBlock(this);
93 } 93 }
94 94
95 95
96 void HBasicBlock::RemovePhi(HPhi* phi) { 96 void HBasicBlock::RemovePhi(HPhi* phi) {
97 ASSERT(phi->block() == this); 97 ASSERT(phi->block() == this);
98 ASSERT(phis_.Contains(phi)); 98 ASSERT(phis_.Contains(phi));
99 ASSERT(phi->HasNoUses() || !phi->is_live()); 99 ASSERT(phi->HasNoUses() || !phi->is_live());
100 phi->ClearOperands(); 100 phi->Kill();
101 phis_.RemoveElement(phi); 101 phis_.RemoveElement(phi);
102 phi->SetBlock(NULL); 102 phi->SetBlock(NULL);
103 } 103 }
104 104
105 105
106 void HBasicBlock::AddInstruction(HInstruction* instr) { 106 void HBasicBlock::AddInstruction(HInstruction* instr) {
107 ASSERT(!IsStartBlock() || !IsFinished()); 107 ASSERT(!IsStartBlock() || !IsFinished());
108 ASSERT(!instr->IsLinked()); 108 ASSERT(!instr->IsLinked());
109 ASSERT(!IsFinished()); 109 ASSERT(!IsFinished());
110 if (first_ == NULL) { 110 if (first_ == NULL) {
(...skipping 7785 matching lines...) Expand 10 before | Expand all | Expand 10 after
7896 } 7896 }
7897 } 7897 }
7898 7898
7899 #ifdef DEBUG 7899 #ifdef DEBUG
7900 if (graph_ != NULL) graph_->Verify(false); // No full verify. 7900 if (graph_ != NULL) graph_->Verify(false); // No full verify.
7901 if (allocator_ != NULL) allocator_->Verify(); 7901 if (allocator_ != NULL) allocator_->Verify();
7902 #endif 7902 #endif
7903 } 7903 }
7904 7904
7905 } } // namespace v8::internal 7905 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698